mirror of
https://github.com/chylex/IntelliJ-IdeaVim.git
synced 2026-09-25 21:19:25 +02:00
67 lines
2.3 KiB
YAML
67 lines
2.3 KiB
YAML
name: Codebase Maintenance with Claude
|
|
|
|
on:
|
|
schedule:
|
|
# Run weekly at 6 AM UTC
|
|
- cron: '0 6 * * 2'
|
|
workflow_dispatch: # Allow manual trigger
|
|
|
|
jobs:
|
|
maintain-codebase:
|
|
runs-on: ubuntu-latest
|
|
if: github.repository == 'JetBrains/ideavim'
|
|
|
|
permissions:
|
|
contents: write
|
|
pull-requests: write
|
|
id-token: write
|
|
issues: read
|
|
actions: read
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0 # Need history for context
|
|
|
|
- name: Install Neovim
|
|
run: |
|
|
wget https://github.com/neovim/neovim/releases/latest/download/nvim-linux-x86_64.tar.gz
|
|
tar xzf nvim-linux-x86_64.tar.gz
|
|
echo "$PWD/nvim-linux-x86_64/bin" >> $GITHUB_PATH
|
|
|
|
- name: Run Claude Code for Codebase Maintenance
|
|
uses: anthropics/claude-code-action@v1
|
|
env:
|
|
ANTHROPIC_BASE_URL: ${{ secrets.PROXY_URL }}
|
|
ANTHROPIC_CUSTOM_HEADERS: |
|
|
Grazie-Agent: {"name":"ideavim-claude-code-action","version":"github-actions"}
|
|
Grazie-Authenticate-JWT: ${{ secrets.ANTHROPIC_API_KEY }}
|
|
with:
|
|
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
|
|
|
|
prompt: |
|
|
## Task: Perform Codebase Maintenance
|
|
|
|
Your goal is to inspect a random part of the IdeaVim codebase and perform maintenance checks.
|
|
|
|
Please follow the detailed maintenance instructions in `.claude/maintenance-instructions.md`.
|
|
|
|
## Creating Pull Requests
|
|
|
|
**Only create a pull request if you made changes to the codebase.**
|
|
|
|
If you made changes, create a PR with:
|
|
- **Title**: "Maintenance: <area> - <brief description>"
|
|
- Example: "Maintenance: VimMotionHandler - Fix null safety issues"
|
|
- **Body** including:
|
|
- What area you inspected
|
|
- Issues you found
|
|
- Changes you made
|
|
- Why the changes improve the code
|
|
|
|
If no changes are needed, do not create a pull request.
|
|
|
|
# Allow Claude to use necessary tools for code inspection and maintenance
|
|
claude_args: '--allowed-tools "Read,Edit,Write,Glob,Grep,Bash(git:*),Bash(gh:*),Bash(./gradlew:*),Bash(find:*),Bash(shuf:*)"'
|