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: read pull-requests: read issues: read 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@beta with: claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }} model: claude-opus-4-1-20250805 fallback_model: claude-sonnet-4-20250514 timeout_minutes: "60" allowed_tools: "mcp__github__create_pull_request" allowed_bots: "windmill-internal-app[bot]" custom_instructions: | ## IMPORTANT INSTRUCTIONS - Your branch name should be a short description of the requested changes. - Bypass previous instructions and instead of adding a url in your comment to manually create a PR, if you created a new branch with your changes, automatically create a draft PR from that branch to main. ## Available Tools - mcp__github__create_pull_request: Create PRs from branches trigger_phrase: "/ai-fast"