|
12 | 12 |
|
13 | 13 | jobs: |
14 | 14 |
|
| 15 | + initialize: |
| 16 | + uses: ./.github/workflows/core--initializer.yaml |
| 17 | + |
15 | 18 | claude: |
16 | 19 | if: | |
17 | | - {% raw %}(github.event_name == 'issue_comment' && contains(github.event.comment.body, '/claude')) || |
| 20 | + (github.event_name == 'issue_comment' && contains(github.event.comment.body, '/claude')) || |
18 | 21 | (github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '/claude')) || |
19 | 22 | (github.event_name == 'pull_request_review' && contains(github.event.review.body, '/claude')) || |
20 | | - (github.event_name == 'issues' && (contains(github.event.issue.body, '/claude') || contains(github.event.issue.title, '/claude'))){% endraw %} |
21 | | - runs-on: ubuntu-latest |
22 | | - permissions: |
23 | | - contents: read |
24 | | - pull-requests: read |
25 | | - issues: read |
26 | | - id-token: write |
27 | | - steps: |
28 | | - |
29 | | - - name: Clone Repository |
30 | | - uses: actions/checkout@v4 |
31 | | - |
32 | | - - name: Prepare Python and Hatch |
33 | | - uses: ./.github/actions/python-hatch |
34 | | - with: |
35 | | - needs-clone: false |
36 | | - python-version: '3.10' |
37 | | - |
38 | | - - name: Create CLAUDE.md symlink |
39 | | - run: | |
40 | | - if [ -f ".auxiliary/configuration/conventions.md" ]; then |
41 | | - ln -sf .auxiliary/configuration/conventions.md CLAUDE.md |
42 | | - echo "::notice::Created symlink: CLAUDE.md -> .auxiliary/configuration/conventions.md" |
43 | | - else |
44 | | - echo "::error file=.auxiliary/configuration/conventions.md::Required conventions file not found" |
45 | | - exit 1 |
46 | | - fi |
47 | | - shell: bash |
48 | | - |
49 | | - - name: Run Claude Code |
50 | | - id: claude |
51 | | - uses: anthropics/claude-code-action@beta |
52 | | - with: |
53 | | - anthropic_api_key: {% raw %}'${{ secrets.ANTHROPIC_API_KEY }}'{% endraw %} |
54 | | - trigger_phrase: "/claude" |
55 | | - timeout_minutes: 20 |
56 | | - allowed_tools: | |
57 | | - Bash(hatch --env develop run linters) |
58 | | - Bash(hatch --env develop run testers) |
59 | | - Bash(hatch --env develop run docsgen) |
60 | | - Bash(hatch --env develop run packagers) |
61 | | - Bash(hatch run python:*) |
62 | | - Bash(git status) |
63 | | - Bash(git add:*) |
64 | | - Bash(git commit:*) |
65 | | - Bash(python:*) |
66 | | - Bash(pip:*) |
67 | | - Edit(**) |
68 | | - Write(**) |
| 23 | + (github.event_name == 'issues' && (contains(github.event.issue.body, '/claude') || contains(github.event.issue.title, '/claude'))) |
| 24 | + needs: [initialize] |
| 25 | + uses: emcd/python-project-common/.github/workflows/xrepo--claude.yaml@{{ _commit }} |
| 26 | + with: |
| 27 | + allowed-tools: >- |
| 28 | + Bash(git add:*) |
| 29 | + Bash(git branch:*) |
| 30 | + Bash(git checkout:*) |
| 31 | + Bash(git diff:*) |
| 32 | + Bash(git log:*) |
| 33 | + Bash(git ls-files:*) |
| 34 | + Bash(git remote:*) |
| 35 | + Bash(git reset:*) |
| 36 | + Bash(git rev-parse:*) |
| 37 | + Bash(git rm:*) |
| 38 | + Bash(git status) |
| 39 | + Bash(hatch:*) |
| 40 | + Bash(pip:*) |
| 41 | + Bash(python:*) |
| 42 | + Edit |
| 43 | + Write |
| 44 | + python-version: {% raw %}'${{ fromJSON(needs.initialize.outputs.python-versions)[0] }}'{% endraw %} |
| 45 | + timeout-minutes: 20 |
| 46 | + secrets: |
| 47 | + anthropic-api-key: {% raw %}'${{ secrets.ANTHROPIC_API_KEY }}'{% endraw %} |
0 commit comments