Issue Triage¶
Investigate new issues and provide actionable triage analysis.
Workflow source: gh-aw-issue-triage.md
How it works¶
When a new issue is opened, reads the issue and related code, reproduces or validates the report where possible, and posts a comment with a root cause analysis and actionable next steps.
Quick Install¶
mkdir -p .github/workflows && curl -sL \
https://raw.githubusercontent.com/elastic/ai-github-actions/v0/gh-agent-workflows/issue-triage/example.yml \
-o .github/workflows/issue-triage.yml
Trigger¶
| Event | Types |
|---|---|
issues |
opened |
Inputs¶
| Input | Description | Required | Default |
|---|---|---|---|
additional-instructions |
Repo-specific instructions appended to the agent prompt. Use this to define label semantics for classification-labels. |
No | "" |
setup-commands |
Shell commands run before the agent starts | No | "" |
allowed-bot-users |
Allowed bot actor usernames (comma-separated); also GH-AW trusted-users under min-integrity approved | No | github-actions[bot] |
classification-labels |
Comma-separated list of labels the agent may apply (e.g. bug,needs-triage,enhancement). If empty, no labels are applied. Define label semantics in additional-instructions. |
No | "" |
report-failure-as-issue |
When true, agent failures are reported as a GitHub issue |
No | true |
github-token-policy |
Elastic-specific. Backstage TokenPolicy id for elastic/oblt-actions/github/create-token. When set, mint an OIDC ephemeral GitHub token in each token-consuming job so labels re-trigger downstream workflows. Requires Elastic TokenPolicy / ephemeral-token infrastructure; leave empty outside Elastic. The caller job must grant id-token: write. |
No | "" |
Secrets¶
| Secret | Description | Required |
|---|---|---|
GH_AW_GITHUB_TOKEN |
Optional override token for GitHub API writes. Prefer github-token-policy with OIDC when available. When neither is set, GITHUB_TOKEN is used and label writes do not re-trigger other workflows. |
No |
Safe Outputs¶
add-comment— post a triage analysis comment on the issueadd-labels— apply labels from the configuredclassification-labelsallowlist (max 3); semantics defined viaadditional-instructions
Example Workflow¶
name: Issue Triage
on:
issues:
types: [opened]
permissions:
actions: read
contents: read
copilot-requests: write
discussions: write
issues: write
pull-requests: write
id-token: write
jobs:
run:
uses: elastic/ai-github-actions/.github/workflows/gh-aw-issue-triage.lock.yml@v0
# with:
# Configure which labels the agent may apply and define their semantics in additional-instructions.
# classification-labels: "bug,needs-triage,enhancement"
# additional-instructions: |
# - `bug`: Apply when the issue describes a clear defect or unexpected behavior.
# - `needs-triage`: Apply when more information is needed before the issue can be acted on.
# - `enhancement`: Apply when the issue describes a new feature or improvement request.
# Elastic-specific (OIDC): mint an ephemeral token inside the lock workflow so
# labels re-trigger downstream workflows. Requires Elastic TokenPolicy /
# ephemeral-token infrastructure and id-token: write on this job. Leave unset outside Elastic.
# github-token-policy: "<shared-token-policy-id>"
#secrets:
# Optional override when not using github-token-policy.
# GH_AW_GITHUB_TOKEN: ${{ secrets.GH_AW_GITHUB_TOKEN }}