Skip to content

Issue Fixer

Investigate new issues and provide actionable triage analysis. For straightforward fixes, implement and open a draft PR.

Workflow source: gh-aw-issue-fixer.md

How it works

Same as Issue Triage, but also implements the fix and opens a draft PR when the fix is straightforward and safe to land quickly.

Quick Install

mkdir -p .github/workflows && curl -sL \
  https://raw.githubusercontent.com/elastic/ai-github-actions/v0/gh-agent-workflows/issue-fixer/example.yml \
  -o .github/workflows/issue-fixer.yml

Trigger

Event Types
issues opened

Inputs

Input Description Required Default
additional-instructions Repo-specific instructions appended to the agent prompt 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]
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 pull requests and comments 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. No
EXTRA_COMMIT_GITHUB_TOKEN Optional token used to push an extra empty commit so PRs created with GITHUB_TOKEN still trigger CI. Not needed when github-token-policy is set. No

Safe Outputs

  • add-comment — post triage analysis on the issue
  • create-pull-request — open a draft PR when a verified fix is implemented

Example Workflow

name: Issue Fixer
on:
  issues:
    types: [opened]

permissions:
  actions: read
  contents: write
  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-fixer.lock.yml@v0
    # with:
      # Elastic-specific (OIDC): mint an ephemeral token inside the lock workflow so
      # PRs re-trigger CI. Requires Elastic TokenPolicy / ephemeral-token infrastructure
      # and id-token: write on this job. Leave unset outside Elastic.
      # github-token-policy: "<shared-token-policy-id>"