name: Fast Claude on: issue_comment: types: [created] pull_request_review_comment: types: [created] issues: types: [opened, assigned] pull_request_review: types: [submitted] jobs: determine-commenter: if: | (github.event_name == 'issue_comment' && contains(github.event.comment.body, '/ai-fast')) || (github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '/ai-fast')) || (github.event_name == 'pull_request_review' && contains(github.event.review.body, '/ai-fast')) || (github.event_name == 'issues' && contains(github.event.issue.body, '/ai-fast')) runs-on: ubicloud-standard-2 outputs: commenter: ${{ steps.determine-commenter.outputs.commenter }} steps: - name: Determine commenter id: determine-commenter run: | # Work out who wrote the comment / review if [[ "${{ github.event_name }}" == "issue_comment" || \ "${{ github.event_name }}" == "pull_request_review_comment" ]]; then COMMENTER="${{ github.event.comment.user.login }}" elif [[ "${{ github.event_name }}" == "pull_request_review" ]]; then COMMENTER="${{ github.event.review.user.login }}" else COMMENTER="${{ github.event.issue.user.login }}" fi echo "commenter=$COMMENTER" >> $GITHUB_OUTPUT check-membership: needs: determine-commenter uses: ./.github/workflows/check-org-membership.yml with: commenter: ${{ needs.determine-commenter.outputs.commenter }} secrets: access_token: ${{ secrets.ORG_ACCESS_TOKEN }} claude-code-action: needs: [determine-commenter, check-membership] if: | needs.check-membership.outputs.is_member == 'true' runs-on: ubicloud-standard-8 permissions: contents: write pull-requests: write issues: write id-token: write steps: - name: Checkout repository uses: actions/checkout@v4 with: fetch-depth: 1 - name: Run Claude PR Action uses: anthropics/claude-code-action@v1 with: claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }} allowed_bots: "windmill-internal-app[bot]" trigger_phrase: "/ai-fast" settings: | { "env": { "SQLX_OFFLINE": "true" } } claude_args: | --allowedTools "Bash,WebFetch,WebSearch" --model opus