file_issues
Preview or file GitHub issues for audit findings, requiring user confirmation before filing to prevent unwanted external actions. Tracks filed issues to avoid duplicates on retry.
Instructions
Preview or file GitHub issues for every recorded finding, via the
user's own gh CLI.
Requires config.issue_mode == "github": if the user chose in-report
delivery instead, this raises rather than filing issues nobody asked
for. Requires at least one recorded domain result.
confirm=False (the default) NEVER files anything and never invokes
gh at all: it returns a preview {repo, count, titles, instruction}
so the calling agent can show the user exactly what is about to be
filed on their repository, and get explicit agreement, before a
single issue goes out. Filing on someone's repo is outward-facing;
this confirmation step is mandatory, not decorative.
confirm=True files one issue per finding that has not already been
filed, so retrying after a partial failure does not double-file the
ones that succeeded. Filed issues are tracked, and returned, per
finding under a key of the form "<rule id>#<n>" (n counting that
rule's findings in recording order), not per rule id: a domain result
may carry two findings for the same rule, and both of their issue
urls have to survive. The target repository is `repo` if given,
otherwise detected from the audited repository directory recorded
by begin_run's repo_dir. If any issue fails to file, filing stops
immediately and the error lists exactly which findings were filed
(with their URLs) and which were not, so a retry knows where to
resume.
Each filed issue carries the "engineering-audit" label. The label is
checked once per call and created on the target repository if it is
missing; the response's label field reports which of present,
created or unavailable happened. Unavailable (creation failed) files
the issues unlabelled and says so once, in warnings, rather than
once per issue.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| repo | No | ||
| confirm | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||