Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 33 additions & 8 deletions .github/workflows/autotriage.yml
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Loading