Update .gitea/workflows/claude.yml
This commit is contained in:
parent
9d8cfabb21
commit
e378b4d3e1
|
|
@ -1,27 +1,25 @@
|
||||||
name: Claude Assistant
|
name: Claude Issue Agent
|
||||||
|
|
||||||
on:
|
on:
|
||||||
issue_comment:
|
|
||||||
types: [created]
|
|
||||||
pull_request_review_comment:
|
|
||||||
types: [created]
|
|
||||||
issues:
|
issues:
|
||||||
types: [opened, assigned, labeled]
|
types: [labeled]
|
||||||
pull_request_review:
|
|
||||||
types: [submitted]
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
handle-issue:
|
handle-issue:
|
||||||
|
if: ${{ contains(github.event.issue.labels.*.name, 'claude-ready') }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Install Claude Code
|
- name: Install Claude Code
|
||||||
run: npm install -g @anthropic-ai/claude-code
|
run: npm install -g @anthropic-ai/claude-code
|
||||||
|
|
||||||
- name: Create branch
|
- name: Create branch
|
||||||
run: |
|
run: |
|
||||||
git config user.name "Claude Agent"
|
git config user.name "Claude Agent"
|
||||||
git config user.email "claude@agent.local"
|
git config user.email "claude@agent.local"
|
||||||
git checkout -b fix/issue-${{ github.event.issue.number }}
|
git checkout -b fix/issue-${{ github.event.issue.number }}
|
||||||
|
|
||||||
- name: Claude works on issue
|
- name: Claude works on issue
|
||||||
env:
|
env:
|
||||||
|
|
@ -41,15 +39,15 @@ jobs:
|
||||||
3. Implement the solution
|
3. Implement the solution
|
||||||
4. Check if all tests still pass, update them or create new tests if there are failing or missing tests.
|
4. Check if all tests still pass, update them or create new tests if there are failing or missing tests.
|
||||||
"
|
"
|
||||||
|
|
||||||
- name: Commit changes
|
- name: Commit changes
|
||||||
run: |
|
run: |
|
||||||
git add .
|
git add .
|
||||||
git commit -m "${{ github.event.issue.title }}"
|
git commit -m "${{ github.event.issue.title }}"
|
||||||
|
|
||||||
- name: Push branch
|
- name: Push branch
|
||||||
run: |
|
run: |
|
||||||
git push origin fix/issue-${{ github.event.issue.number }}
|
git push origin fix/issue-${{ github.event.issue.number }}
|
||||||
|
|
||||||
- name: Create PR
|
- name: Create PR
|
||||||
run: |
|
run: |
|
||||||
|
|
@ -61,4 +59,4 @@ jobs:
|
||||||
\"head\": \"fix/issue-${{ github.event.issue.number }}\",
|
\"head\": \"fix/issue-${{ github.event.issue.number }}\",
|
||||||
\"base\": \"main\",
|
\"base\": \"main\",
|
||||||
\"body\": \"Automatically resolved by Claude.\n\nCloses #${{ github.event.issue.number }}\"
|
\"body\": \"Automatically resolved by Claude.\n\nCloses #${{ github.event.issue.number }}\"
|
||||||
}"
|
}"
|
||||||
Loading…
Reference in New Issue