|
| 1 | +name: Claude Code |
| 2 | + |
| 3 | +on: |
| 4 | + issue_comment: |
| 5 | + types: [created] |
| 6 | + pull_request_review_comment: |
| 7 | + types: [created] |
| 8 | + issues: |
| 9 | + types: [opened, assigned] |
| 10 | + pull_request_review: |
| 11 | + types: [submitted] |
| 12 | + |
| 13 | +jobs: |
| 14 | + # Interactive mode - responds to @claude mentions with tracking comments |
| 15 | + claude: |
| 16 | + if: | |
| 17 | + github.actor == 'zbeyens' && ( |
| 18 | + (github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) || |
| 19 | + (github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) || |
| 20 | + (github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) || |
| 21 | + (github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude'))) |
| 22 | + ) |
| 23 | + runs-on: ubuntu-latest |
| 24 | + permissions: |
| 25 | + contents: write |
| 26 | + pull-requests: write |
| 27 | + issues: write |
| 28 | + id-token: write |
| 29 | + actions: read |
| 30 | + steps: |
| 31 | + - name: Checkout repository |
| 32 | + uses: actions/checkout@v4 |
| 33 | + with: |
| 34 | + fetch-depth: 1 |
| 35 | + |
| 36 | + - name: Setup Bun |
| 37 | + uses: oven-sh/setup-bun@v2 |
| 38 | + with: |
| 39 | + bun-version: latest |
| 40 | + |
| 41 | + - name: Cache bun |
| 42 | + uses: actions/cache@v4 |
| 43 | + with: |
| 44 | + path: ~/.bun/install/cache |
| 45 | + key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lock') }} |
| 46 | + restore-keys: | |
| 47 | + ${{ runner.os }}-bun- |
| 48 | +
|
| 49 | + - name: Install dependencies |
| 50 | + run: bun install |
| 51 | + |
| 52 | + - name: Run Claude Code |
| 53 | + uses: anthropics/claude-code-action@v1 |
| 54 | + with: |
| 55 | + claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }} |
| 56 | + |
| 57 | + # No prompt = interactive mode with tracking comments |
| 58 | + |
| 59 | + plugin_marketplaces: | |
| 60 | + https://github.com/EveryInc/compound-engineering-plugin.git |
| 61 | + https://github.com/udecode/dotai.git |
| 62 | + plugins: | |
| 63 | + compound-engineering@every-marketplace |
| 64 | + dig@dotai |
| 65 | + debug@dotai |
| 66 | + test@dotai |
| 67 | +
|
| 68 | + settings: | |
| 69 | + { |
| 70 | + "env": { |
| 71 | + "BASH_DEFAULT_TIMEOUT_MS": "1800000" |
| 72 | + }, |
| 73 | + "permissions": { |
| 74 | + "allow": ["Bash", "Edit", "Glob", "Grep", "Read", "Task", "Write", "WebFetch", "WebSearch"] |
| 75 | + } |
| 76 | + } |
| 77 | + claude_args: | |
| 78 | + --max-turns 1000 |
| 79 | +
|
| 80 | + additional_permissions: | |
| 81 | + actions: read |
| 82 | +
|
| 83 | + # Automation mode - responds to /commands |
| 84 | + slash-commands: |
| 85 | + if: | |
| 86 | + github.actor == 'zbeyens' && ( |
| 87 | + (github.event_name == 'issue_comment' && startsWith(github.event.comment.body, '/')) || |
| 88 | + (github.event_name == 'pull_request_review_comment' && startsWith(github.event.comment.body, '/')) |
| 89 | + ) |
| 90 | + runs-on: ubuntu-latest |
| 91 | + permissions: |
| 92 | + contents: write |
| 93 | + pull-requests: write |
| 94 | + issues: write |
| 95 | + id-token: write |
| 96 | + actions: read |
| 97 | + steps: |
| 98 | + - name: Checkout repository |
| 99 | + uses: actions/checkout@v4 |
| 100 | + with: |
| 101 | + fetch-depth: 1 |
| 102 | + |
| 103 | + - name: Setup Bun |
| 104 | + uses: oven-sh/setup-bun@v2 |
| 105 | + with: |
| 106 | + bun-version: latest |
| 107 | + |
| 108 | + - name: Cache bun |
| 109 | + uses: actions/cache@v4 |
| 110 | + with: |
| 111 | + path: ~/.bun/install/cache |
| 112 | + key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lock') }} |
| 113 | + restore-keys: | |
| 114 | + ${{ runner.os }}-bun- |
| 115 | +
|
| 116 | + - name: Install dependencies |
| 117 | + run: bun install |
| 118 | + |
| 119 | + - name: Run Claude Code |
| 120 | + uses: anthropics/claude-code-action@v1 |
| 121 | + with: |
| 122 | + claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }} |
| 123 | + |
| 124 | + # Pass comment body for slash commands |
| 125 | + prompt: ${{ github.event.comment.body }} |
| 126 | + track_progress: true |
| 127 | + |
| 128 | + plugin_marketplaces: | |
| 129 | + https://github.com/EveryInc/compound-engineering-plugin.git |
| 130 | + https://github.com/udecode/dotai.git |
| 131 | + plugins: | |
| 132 | + compound-engineering@every-marketplace |
| 133 | + dig@dotai |
| 134 | + debug@dotai |
| 135 | + test@dotai |
| 136 | +
|
| 137 | + settings: | |
| 138 | + { |
| 139 | + "env": { |
| 140 | + "BASH_DEFAULT_TIMEOUT_MS": "1800000" |
| 141 | + }, |
| 142 | + "permissions": { |
| 143 | + "allow": ["Bash", "Edit", "Glob", "Grep", "Read", "Task", "Write", "WebFetch", "WebSearch"] |
| 144 | + } |
| 145 | + } |
| 146 | + claude_args: | |
| 147 | + --max-turns 1000 |
| 148 | +
|
| 149 | + additional_permissions: | |
| 150 | + actions: read |
0 commit comments