From 9dd447b8ba8f7c317ddf98d0c52d67352022896b Mon Sep 17 00:00:00 2001 From: emily-shen <69125074+emily-shen@users.noreply.github.com> Date: Wed, 25 Feb 2026 16:07:49 +0000 Subject: [PATCH] Add `ask-bonk` (#12674) --- .github/workflows/bonk.yml | 37 +++++++++++++++++++++++ .github/workflows/claude.yml | 57 ------------------------------------ 2 files changed, 37 insertions(+), 57 deletions(-) create mode 100644 .github/workflows/bonk.yml delete mode 100644 .github/workflows/claude.yml diff --git a/.github/workflows/bonk.yml b/.github/workflows/bonk.yml new file mode 100644 index 000000000000..52c5d47b55ea --- /dev/null +++ b/.github/workflows/bonk.yml @@ -0,0 +1,37 @@ +name: Bonk + +on: + issue_comment: + types: [created] + pull_request_review_comment: + types: [created] + +concurrency: + group: ${{ github.workflow }}-${{ github.event.issue.number || github.event.pull_request.number }} + cancel-in-progress: false + +jobs: + bonk: + if: github.event.sender.type != 'Bot' && (contains(github.event.comment.body, '/bonk') || contains(github.event.comment.body, '@ask-bonk')) + runs-on: ubuntu-latest + permissions: + id-token: write + contents: write + issues: write + pull-requests: write + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: 1 + + - name: Run Bonk + uses: ask-bonk/ask-bonk/github@main + env: + CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CF_AI_GATEWAY_ACCOUNT_ID }} + CLOUDFLARE_GATEWAY_ID: ${{ secrets.CF_AI_GATEWAY_NAME }} + CLOUDFLARE_API_TOKEN: ${{ secrets.CF_AI_GATEWAY_TOKEN }} + with: + model: "cloudflare-ai-gateway/anthropic/claude-opus-4-5" + mentions: "/bonk,@ask-bonk" + permissions: write diff --git a/.github/workflows/claude.yml b/.github/workflows/claude.yml deleted file mode 100644 index a63fb9573bd4..000000000000 --- a/.github/workflows/claude.yml +++ /dev/null @@ -1,57 +0,0 @@ -name: Claude Code - -on: - issue_comment: - types: [created] - pull_request_review_comment: - types: [created] - issues: - types: [opened, assigned] - pull_request_review: - types: [submitted] - -jobs: - claude: - if: | - (github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) || - (github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) || - (github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) || - (github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude'))) - runs-on: ubuntu-latest - permissions: - contents: read - pull-requests: read - issues: read - id-token: write - steps: - - name: Checkout repository - uses: actions/checkout@v4 - with: - fetch-depth: 1 - - - name: Setup pnpm - uses: pnpm/action-setup@v4 - - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version: lts/* - cache: "pnpm" - - - name: Install dependencies - run: pnpm install - - - name: Run Claude Code - id: claude - uses: anthropics/claude-code-action@beta - with: - anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }} - allowed_tools: "Bash(pnpm check),Bash(pnpm test:ci*)" - custom_instructions: | - When running tests, ALWAYS use the --filter flag to run tests for a specific package only. - Never run `pnpm test:ci` without a filter - this would run tests across the entire monorepo and take too long. - - Correct usage: `pnpm test:ci --filter ` - Example: `pnpm test:ci --filter wrangler` - - You can also run a specific test by pattern: `pnpm test:ci --filter "test pattern"`