Get started¶
What a repository needs for the issue assistant, how to set it up there, and how to see it work before the first reporter does.
Requirements¶
- A repository on GitHub.com with issues turned on, public or private. Issue forms are optional; their answers choose labels when the repository has them.
- GitHub-hosted runners. The jobs without AI run on
ubuntu-24.04, the AI onubuntu-24.04-firewall, the runner with GitHub's native egress firewall. That runner is a technical preview: it exists for Linux only, and GitHub expects a workflow on it to take roughly 15 to 20 % longer. The analysis runs on this runner, so that the AI reaches no host but those of.github/egress-firewall.yaml, unless the repository variableISSUE_ASSISTANT_AI_RUNNERnames one of GitHub's runners of Ubuntu with a fixed version in its place, such asubuntu-24.04, where Harden-Runner blocks the other hosts: What if the firewall runner is gone? - An engine and its secret, in the environment
issue-assistant: for Claude, the default engine, a token of a Claude subscription, whichclaude setup-tokencreates, asCLAUDE_CODE_OAUTH_TOKEN, or an API key asANTHROPIC_API_KEY; for Codex, Gemini or Copilot, the secret that Engines names. Gemini starts for free, in the daily limits of the Gemini API's free tier. Without the secret, everything that needs the AI pauses: the first analysis, the follow-ups, and deciding whether a comment waits for the reporter or says that a fix didn't help. Labels from the forms, reminders, closing and the closing of fixed issues with the release keep working, and each run notes that no credentials are configured. - Dependabot or Renovate, whose pull requests bring each new release: Turn on updates.
- For the set-up: Python 3.12 or newer with PyYAML (
pip install pyyaml) oryq, git and the GitHub CLI on your computer, and the right to manage environments and secrets of the repository.
Set up a repository¶
A set-up has three parts: what install writes, what you edit, and what you set on GitHub:
-
Install the latest release in the root of your repository, with Python 3.12 or newer, PyYAML (
pip install pyyaml) oryqto read YAML, git and the GitHub CLI:tag="$(gh release view --repo Dennis-Otto/issue-assistant --json tagName --jq .tagName)" dir="$(mktemp -d)" git clone --quiet --depth 1 --branch "$tag" https://github.com/Dennis-Otto/issue-assistant "$dir" && PYTHONPATH="$dir" python3 -P -m issue_assistant install --setupinstallpins the workflows to the commit and the tag of its checkout, and writes the settings and the starters that the repository lacks.--setupcreates the environmentissue-assistant, which only the default branch may use, and asks for the engine's secret. For Claude,claude setup-tokencreates the token of a Claude subscription,CLAUDE_CODE_OAUTH_TOKEN; an API key goes intoANTHROPIC_API_KEYinstead. For another engine, set itsnameinconfig.tomlfirst, as Change the engine shows, and--setupasks for its secret. Each step looks first, so running it again changes nothing but the workflows. -
Describe the project in
.github/issue-assistant/project.md: what it does, where the code, documentation, troubleshooting guide and changelog are, which versions and logs matter in a bug report, and how to address reporters if not as the catalogs of the languages do, such as with Sie in German. The AI reads it before every task. Then adapt the starters to the project, its labels and its issue forms, until the check passes:PYTHONPATH="$dir" python3 -P -m issue_assistant check -
Let the release close fixed issues: under Settings → General → Issues, clear Auto-close issues with merged linked pull requests, which has no API. A repository without releases sets
close_with_release = falseinconfig.toml, and one whose release workflow starts the sweep itselfsweep_after_release_workflow = false.Turn on what the chooser links to, when
installwrote.github/ISSUE_TEMPLATE/config.yml, as both links lead nowhere until then: Settings → General → Features → Discussions, and Settings → Advanced Security → Private vulnerability reporting. GitHub offers private vulnerability reporting only for public repositories, so a private repository removes that link.Turn on updates by Dependabot or Renovate, if neither looks after the repository yet.
-
Try it: commit the set-up, push it to the default branch, and under Actions → Issue assistant → Run workflow, enter the number of an issue. A run by hand starts as a dry run, which writes nothing; the summary of the job Check and post the analysis (
apply) shows the labels and the comment it would post:
On Windows, run the commands in Git Bash; Python's launcher py takes the place of python3, which there usually opens the Microsoft Store.
What install writes¶
| File | When | What you do |
|---|---|---|
.github/workflows/issue-assistant.yml, issue-lifecycle.yml, labels.yml, findings.yml |
always, with the pin of the release | nothing: the check makes sure that they equal the templates; findings.yml takes only the scans of main with [findings] pull_requests = false, when another workflow dismisses the findings of pull requests |
.github/workflows/discussion-assistant.yml |
with the pin of the release, when [discussions] answer_categories of config.toml names a category, as the starter does, or when it is there |
nothing: the check makes sure that it equals its template, and wants it while a category is named |
.github/egress-firewall.yaml |
when missing | add any hosts that the engine needs besides those of the template |
.github/issue-assistant/project.md |
when missing | describe the project, as step 2 says |
.github/labels.toml |
when missing | define the labels: the seven lifecycle labels are required; kinds, areas, topics and, if you add them, priorities are what the AI chooses from |
.github/issue-assistant/config.toml |
when missing | choose the engine, the hosts that links may lead to, the field of the issue forms that chooses an area, the categories of discussions that get a first answer, and the files that tell reporters which AI reads their issue |
.github/findings.toml |
when missing | accept findings of code scanning that can't or shouldn't be fixed, each with its reason |
.github/ISSUE_TEMPLATE/bug_report.yml, feature_request.yml |
together with the starter labels.toml, when the repository has no issue forms or templates |
adapt the answers of the field Area, whose form_options in labels.toml choose an area label; their box Automated analysis lets a reporter say no to the AI |
.github/ISSUE_TEMPLATE/config.yml |
with these forms, when it is missing | turn on what its links need in the settings of the repository: Discussions, for the first category of [discussions] answer_categories, and private vulnerability reporting, which GitHub offers only for public repositories; remove a link that you don't want or that can't work |
SUPPORT.md, or the files of [transparency] |
when they don't name the engine; in a notice that they have, the days of [lifecycle] in each line that still reads as the template's |
the section What happens with your issue, which the footer of every analysis and follow-up links, tells reporters which AI reads their issue, in German for a file such as SUPPORT.de.md |
.github/actionlint.yaml |
when it exists | nothing: it ignores the queue of issue-assistant.yml, which actionlint 1.7.12 doesn't know yet |
.gitignore |
when the entry is missing | nothing: /.issue-assistant/ keeps the context of the AI out of commits |
The chooser is what GitHub shows on New issue. It turns blank issues off, so every issue starts from a form, and its links take the rest to where it belongs: the first category of answer_categories, a link that it leaves out when none is named, private vulnerability reporting, and the first file of [transparency]. install takes the owner and the name in these links from GH_REPO, from GITHUB_REPOSITORY or from the remote origin; without any of them, it writes OWNER/NAME, and the check asks you to replace it; running install again does so once the remote names the repository.
GitHub ignores the case of label names, so the Labels workflow renames a label that the repository has in another case, such as Bug for bug, instead of creating a second one. A YAML file that install can't edit without changing the rest, such as a list in braces, it leaves as it is and names what to add.
Keep it checked¶
Add the check to the CI of the repository, so that a change of the labels, the forms or the settings can't break the assistant unnoticed:
- uses: actions/checkout@<commit-hash> # vX
with:
persist-credentials: false
- name: Check the issue assistant's set-up
uses: Dennis-Otto/issue-assistant@<commit-hash> # vX.Y.Z
# Optional: check the runner that the variable names for the AI, too.
env:
ISSUE_ASSISTANT_AI_RUNNER: ${{ vars.ISSUE_ASSISTANT_AI_RUNNER }}
with:
command: check
The listing on the GitHub Marketplace offers a bare step of the action under Use latest version, with every input and an empty command; on its own, give it command: check, as above. The four workflows that run the assistant come from install, in step 1 of Set up a repository, and call the other commands of the action themselves.
The check runs on Linux, macOS or Windows, with Python 3.12 or newer, and reads YAML with PyYAML or yq. In a job, the action is tested on ubuntu-24.04, ubuntu-26.04 and ubuntu-24.04-arm; on an older Python it stops with an error that names the version and the fix. When a workflow differs from its template, it names the commands that write the templates of its release anew.
Without --setup¶
install alone writes only files. Create the environment and its secret in Settings → Environments or with the GitHub CLI; BRANCH is the default branch:
gh api -X PUT repos/OWNER/REPO/environments/issue-assistant -F "deployment_branch_policy[protected_branches]=false" -F "deployment_branch_policy[custom_branch_policies]=true"
gh api -X POST repos/OWNER/REPO/environments/issue-assistant/deployment-branch-policies -f name=BRANCH -f type=branch
gh secret set CLAUDE_CODE_OAUTH_TOKEN --env issue-assistant --repo OWNER/REPO
install runs from a git checkout of a release, whose commit and tag it pins. A checkout of another commit needs --ref with that commit and a --version that names no other one; a folder without git, such as an unpacked package of a release, needs both.
Without the secret, labels, reminders, closing and reopening keep working. The repository variable ISSUE_ASSISTANT_AI set to off switches the AI off.
Turn on updates¶
Updates arrive as pull requests of Dependabot or Renovate that move the commit hash of the issue assistant in the workflows, and that is the whole update: the jobs are those of the release that the workflows pin. Only a release that changes a template needs the commands of step 1 again, and its release notes say so.
Dependabot moves them only once .github/dependabot.yml names the ecosystem github-actions:
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
cooldown:
default-days: 7
The cooldown waits a week before a new release, as zizmor asks; security updates come at once. Renovate moves them by its defaults, once a configuration such as renovate.json, or the key renovate of package.json, is there. Without either, the repository keeps the release of its set-up and gets no fix, while the security policy supports only the latest release. So install names the step, and check warns without failing: Renovate may also run from elsewhere, such as with a preset of the organization.
Check that it works¶
- The check passes on your computer and in the CI of the repository, as Keep it checked above adds it. It names every problem of the labels, the issue forms, the workflows, the firewall policy and the settings, every key that it doesn't know, and a
project.mdthat still holds the starter's first line or says less than 80 characters. Troubleshooting has the fix for each. - The labels exist once the set-up is merged into the default branch: the Labels workflow creates those of
.github/labels.toml, and Issues → Labels lists them. - A dry run shows the comment: the summary of the job Check and post the analysis (
apply) shows the labels and the comment that it would post, and writes nothing. - A new issue gets its analysis in a few minutes. Open it from an account that isn't a maintainer's: issues of the owner, members and collaborators get the labels of their form, but no analysis.
When no comment comes, troubleshooting has the usual causes, each with its fix. What reporters see shows every comment that the assistant posts.
Start with a backlog¶
Issues that were open before get a first analysis by the task backlog.
Three steps, for a maintainer
- See what it would do. Under Actions → Issue assistant → Run workflow, choose the task
backlogand enter0as the issue, or rungh workflow run issue-assistant.yml -f mode=backlog -f issue=0. As a dry run, it chooses the oldest open issues without a first analysis, up tobacklog_per_runofconfig.toml, 20 by default; it runs the AI for each, so set it low for a first look. The summary of the job Check and post the analysis (apply) of each shows its labels, a possible duplicate and the missing information as a table. - Set the labels. Run it again from the same number with dry_run off. It sets the labels of each analysis and posts no comment on the old issues, unless you tick comment.
- Go on. The summary of the job
assistantnames the last issue that it chose: enter that number as the issue of the next run, until it says that the backlog is done.
Each issue costs a first analysis, which counts toward no daily limit.
Show that you use it¶
The footer of every comment of the AI already links the issue assistant, unless [transparency] credit = false in .github/issue-assistant/config.toml leaves that out. A badge in your README tells people before they open an issue, and helps others find the tool:
[](https://dennis-otto.github.io/issue-assistant/)
Remove the assistant¶
Five steps, for a maintainer
Setting ISSUE_ASSISTANT_AI to off only turns the AI off, as the FAQ says. To remove the assistant from a repository, undo what the set-up did, in this order:
-
Delete the workflows and the files that
installwrote, in one pull request: the five workflows in.github/workflows/,issue-assistant.yml,issue-lifecycle.yml,labels.yml,findings.ymlanddiscussion-assistant.yml, which answers discussions with the engine too; the settings in.github/issue-assistant/,.github/labels.toml,.github/findings.tomland the firewall policy.github/egress-firewall.yaml; and the step of the check that Keep it checked added to the CI, which would fail without them.discussion-assistant.yml,.github/findings.tomland the firewall policy exist only where the set-up wrote them, so the command skips what is missing. Once it is merged, nothing of the assistant runs any more.git rm -r --ignore-unmatch .github/workflows/issue-assistant.yml .github/workflows/issue-lifecycle.yml \ .github/workflows/labels.yml .github/workflows/findings.yml \ .github/workflows/discussion-assistant.yml .github/issue-assistant \ .github/labels.toml .github/findings.toml .github/egress-firewall.yaml -
Delete the environment
issue-assistant, with the engine's secret in it, and the repository variablesISSUE_ASSISTANT_AIandISSUE_ASSISTANT_AI_RUNNER, where you set them, under Settings → Environments and Settings → Secrets and variables → Actions, or with the GitHub CLI:gh api -X DELETE repos/OWNER/REPO/environments/issue-assistant gh variable delete ISSUE_ASSISTANT_AI gh variable delete ISSUE_ASSISTANT_AI_RUNNER -
Settle the issues that the assistant looked after. Close the issue of the digest, if the sweep kept one. Nothing reminds the reporters of the open issues labeled
needs-infoany more, or closes those labeledfixed-in-next-releasewith the release:gh issue list --label needs-infoandgh issue list --label fixed-in-next-releaselist them, for you to answer, close or relabel. The labels themselves stay, since the Labels workflow never deletes one; delete those you no longer want under Issues → Labels. - Let merged pull requests close their issues again: under Settings → General → Issues, tick Auto-close issues with merged linked pull requests, which step 3 of the set-up cleared.
- Stop telling reporters about the AI: remove the section What happens with your issue from
SUPPORT.md, or from the files of[transparency], and the box Automated analysis from the issue forms, which nothing reads any more. The entry/.issue-assistant/of.gitignorecan go as well. These are files, so they can go into the pull request of step 1.

