diff --git a/.github/AutoTriage.prompt b/.github/AutoTriage.prompt new file mode 100644 index 0000000..5c45f30 --- /dev/null +++ b/.github/AutoTriage.prompt @@ -0,0 +1,7 @@ +# DesktopClock AutoTriage Policy + +## Scope +- The only allowed action is applying labels to the issue or pull request being triaged. + +## Rules +- Apply the single best primary label (`bug`, `enhancement`, or `question`) when one clearly fits. diff --git a/.github/workflows/autotriage-issues.yml b/.github/workflows/autotriage-issues.yml new file mode 100644 index 0000000..9ece634 --- /dev/null +++ b/.github/workflows/autotriage-issues.yml @@ -0,0 +1,27 @@ +name: AutoTriage (Issues) + +on: + issues: + types: [opened] + +permissions: + contents: read + issues: write + pull-requests: write + +jobs: + triage_issue: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + + - name: AutoTriage - triage issue + uses: danielchalmers/AutoTriage@v3 + with: + issues: ${{ github.event.issue.number }} + prompt-path: .github/AutoTriage.prompt + model-fast: "" + model-pro: gemini-3.1-flash-lite-preview + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }} diff --git a/.github/workflows/autotriage-prs.yml b/.github/workflows/autotriage-prs.yml new file mode 100644 index 0000000..454d3f1 --- /dev/null +++ b/.github/workflows/autotriage-prs.yml @@ -0,0 +1,27 @@ +name: AutoTriage (PRs) + +on: + pull_request_target: + types: [opened, ready_for_review] + +permissions: + contents: read + issues: write + pull-requests: write + +jobs: + triage_pr: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + + - name: AutoTriage - triage PR + uses: danielchalmers/AutoTriage@v3 + with: + issues: ${{ github.event.pull_request.number }} + prompt-path: .github/AutoTriage.prompt + model-fast: "" + model-pro: gemini-3.1-flash-lite-preview + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}