From 4b83e716d0ee7e02dc2641161b214df51302a973 Mon Sep 17 00:00:00 2001 From: Daniel Chalmers Date: Tue, 13 Oct 2026 00:52:44 -0500 Subject: [PATCH] Upgrade AutoTriage to v5 --- .github/workflows/autotriage.yml | 41 +++++++++++++++++++++++++------- 1 file changed, 33 insertions(+), 8 deletions(-) diff --git a/.github/workflows/autotriage.yml b/.github/workflows/autotriage.yml index 4be69a1..d2a0388 100644 --- a/.github/workflows/autotriage.yml +++ b/.github/workflows/autotriage.yml @@ -1,10 +1,20 @@ name: AutoTriage on: - pull_request_target: - types: [opened] issues: - types: [opened] + types: [opened, reopened] + pull_request_target: + types: [opened, reopened, ready_for_review] + issue_comment: + types: [created] + workflow_dispatch: + inputs: + issues: + description: 'Issue or PR numbers (blank = backlog)' + dry-run: + description: 'Plan without applying' + type: boolean + default: true permissions: contents: read @@ -13,13 +23,28 @@ permissions: jobs: triage: + # Skip draft PRs, and issues and comments from bots. + if: >- + (github.event_name == 'pull_request_target' && !github.event.pull_request.draft) || + (github.event_name != 'pull_request_target' && github.event.sender.type != 'Bot') runs-on: ubuntu-latest + timeout-minutes: 60 + concurrency: + group: autotriage + queue: max steps: - - uses: actions/checkout@v6 - - - uses: danielchalmers/AutoTriage@v4 + - uses: danielchalmers/AutoTriage@v5 with: - issues: ${{ github.event.pull_request.number || github.event.issue.number }} + issues: ${{ inputs.issues }} + # New activity is triaged live, while a manual run, which can sweep the backlog, only plans unless dry-run is unticked. + dry-run: ${{ inputs.dry-run }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }} + ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} + + - if: always() + uses: actions/upload-artifact@v7 + with: + name: autotriage-${{ github.run_number }} + path: artifacts + if-no-files-found: ignore