mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-08-27 23:33:31 +02:00
Merge pull request #2900 from alexbelgium/feat/triage-single-issue-dispatch
feat: manual tier-1 triage of a single issue number
This commit is contained in:
22
.github/workflows/on_issues_ai_triage.yaml
vendored
22
.github/workflows/on_issues_ai_triage.yaml
vendored
@@ -13,6 +13,11 @@ name: AI issue triage
|
|||||||
on:
|
on:
|
||||||
issues:
|
issues:
|
||||||
types: [opened]
|
types: [opened]
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
issue:
|
||||||
|
description: "Issue number to (re-)triage manually"
|
||||||
|
required: true
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
@@ -20,7 +25,7 @@ permissions:
|
|||||||
id-token: write # claude-code-action fetches a GitHub OIDC token to auth the OAuth flow
|
id-token: write # claude-code-action fetches a GitHub OIDC token to auth the OAuth flow
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ai-triage-${{ github.event.issue.number }}
|
group: ai-triage-${{ github.event.issue.number || inputs.issue }}
|
||||||
cancel-in-progress: false
|
cancel-in-progress: false
|
||||||
|
|
||||||
env:
|
env:
|
||||||
@@ -28,9 +33,13 @@ env:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
classify:
|
classify:
|
||||||
|
# Manual dispatch is a deliberate override: skip the auto-trigger guards
|
||||||
|
# (don't self-triage the maintainer's own issues; honour the no-ai
|
||||||
|
# opt-out) that only make sense for the fire-on-every-open path.
|
||||||
if: >-
|
if: >-
|
||||||
github.event.issue.user.login != 'alexbelgium' &&
|
github.event_name == 'workflow_dispatch' ||
|
||||||
!contains(github.event.issue.labels.*.name, 'no-ai')
|
(github.event.issue.user.login != 'alexbelgium' &&
|
||||||
|
!contains(github.event.issue.labels.*.name, 'no-ai'))
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 15
|
timeout-minutes: 15
|
||||||
environment: CR_PAT
|
environment: CR_PAT
|
||||||
@@ -41,7 +50,10 @@ jobs:
|
|||||||
# Both workflows fire on the same issues.opened event and race. The
|
# Both workflows fire on the same issues.opened event and race. The
|
||||||
# submitter ping completes in 6-11s of job time across recent runs; 60s
|
# submitter ping completes in 6-11s of job time across recent runs; 60s
|
||||||
# leaves a generous margin for runner-queue skew between the two jobs.
|
# leaves a generous margin for runner-queue skew between the two jobs.
|
||||||
|
# A manual dispatch runs against an existing issue whose ping (if any)
|
||||||
|
# landed long ago, so there is nothing to wait for.
|
||||||
- name: Wait for ping_submitter
|
- name: Wait for ping_submitter
|
||||||
|
if: github.event_name == 'issues'
|
||||||
run: sleep 60
|
run: sleep 60
|
||||||
|
|
||||||
- name: Checkout tooling
|
- name: Checkout tooling
|
||||||
@@ -57,7 +69,7 @@ jobs:
|
|||||||
- name: Build context bundle
|
- name: Build context bundle
|
||||||
env:
|
env:
|
||||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
ISSUE_NUMBER: ${{ github.event.issue.number }}
|
ISSUE_NUMBER: ${{ github.event.issue.number || inputs.issue }}
|
||||||
REPO: ${{ github.repository }}
|
REPO: ${{ github.repository }}
|
||||||
run: bash .github/scripts/ai_triage_context.sh
|
run: bash .github/scripts/ai_triage_context.sh
|
||||||
|
|
||||||
@@ -83,7 +95,7 @@ jobs:
|
|||||||
- name: Apply verdict
|
- name: Apply verdict
|
||||||
env:
|
env:
|
||||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
ISSUE: ${{ github.event.issue.number }}
|
ISSUE: ${{ github.event.issue.number || inputs.issue }}
|
||||||
REPO: ${{ github.repository }}
|
REPO: ${{ github.repository }}
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|||||||
Reference in New Issue
Block a user