Repository navigation
Commit b044ee5
feat(flue): Add shared issue triage workflow (#180)
* feat(flue): Add shared issue triage workflow
Move issue triage automation into the org .github repository so target repositories can call one shared Flue workflow. Add the Sentry Intern persona, central repository allowlist, manual issue dispatch path, and focused validation coverage.
Co-Authored-By: GPT-5 Codex <noreply@openai.com>
* fix(flue): Sanitize issue triage repository input
Validate the repository input before exporting a canonical owner/name value and pass that sanitized value through environment variables in shell steps. This avoids evaluating caller-controlled repository text while preserving the reusable workflow contract.
Co-Authored-By: GPT-5 Codex <noreply@openai.com>
* fix(flue): Run issue triage from org workflow
Subscribe the shared issue triage workflow to opened issue events directly from .github instead of exposing it as a reusable workflow. Resolve the target repository and issue number from either the issue event or manual dispatch before the feature allowlist and agent steps run.
Co-Authored-By: GPT-5 Codex <noreply@openai.com>
* fix(flue): Handle duplicate closure failures
Keep duplicate triage from crashing when GitHub mutations fail. Duplicate closure now records comment, label, and close failures in the result so the workflow can surface human-review context instead of throwing through the whole run.
Co-Authored-By: GPT-5 Codex <noreply@openai.com>
* fix(flue): Restore reusable issue triage workflow
Keep issue triage as a reusable workflow because GitHub Actions event triggers run in the repository where the event occurs. Document the required local caller workflow and require workflow_call invocations to target the caller repository before the feature allowlist and token creation steps run.
Co-Authored-By: GPT-5 Codex <noreply@openai.com>
* fix(flue): Fallback for older gh duplicate closure
Check whether the installed gh CLI supports --duplicate-of before linking duplicate closures. Fall back to --reason duplicate on older runners so duplicate triage can still close the issue instead of degrading to human review.
Co-Authored-By: GPT-5 Codex <noreply@openai.com>
* fix(flue): Harden issue triage workflow contracts
Validate the reusable workflow against GitHub Actions and action input contracts. Keep the workflow scoped to getsentry, validate required secrets before token creation, and configure pnpm setup to read automation/package.json.
Also reject cross-repository duplicate candidates before automatic closure so only same-repo duplicates can be closed without human review.
Co-Authored-By: GPT-5 Codex <noreply@openai.com>
* fix(flue): Detect missing triage checkout
Return an unavailable repository context when the prepared checkout path is missing or not a git checkout. This keeps the diagnosis stage from trusting a checkout path that cannot be inspected.
Co-Authored-By: GPT-5 Codex <noreply@openai.com>
* chore: Add local lint hooks
Install Prettier, lint-staged, simple-git-hooks, and a repo-local actionlint wrapper so workflow linting can run through pnpm. Format existing supported files once so the new lint gate starts green.
Co-Authored-By: GPT-5 Codex <noreply@openai.com>
* fix(flue): Require validated repo for duplicate closure
Derive the current repository from the issue URL when the payload omits it, and fall back to human review if either side of the duplicate comparison cannot be validated. This preserves the same-repository auto-close invariant for direct CLI invocations too.
Co-Authored-By: GPT-5 Codex <noreply@openai.com>
* ref(flue): Simplify shared issue triage patch
Remove repo-local lint hook scaffolding and keep the workflow allowlist inline. Use the prepared target checkout directly and keep local tests on Node's built-in test runner to reduce dependency churn.
Co-Authored-By: GPT-5 Codex <noreply@openai.com>
* fix(flue): Address issue triage review feedback
Make target repository checkout use the workflow token explicitly and close linked duplicates with gh --duplicate-of when available. Keep a duplicate reason fallback for older gh versions.
Co-Authored-By: GPT-5 Codex <noreply@openai.com>
* fix(flue): Use GITHUB_TOKEN for target checkout
Pass the workflow GITHUB_TOKEN explicitly to both target repository checkout steps so reusable workflow callers use their repository-scoped token for source inspection.
Co-Authored-By: GPT-5 Codex <noreply@openai.com>
* fix(flue): Harden issue triage validation
Allow valid owner/repo pairs where the owner and repository names match by checking slash presence directly.
Validate gh support for not planned close reasons before building that duplicate closure command, matching the existing duplicate closure capability check.
Co-Authored-By: OpenAI Codex <codex@openai.com>
* fix(flue): Comment after duplicate closure
Close duplicate issues before posting the closure explanation so the bot does not claim an action that failed.
Use past-tense duplicate closure copy and cover that wording in the issue triage tests.
Co-Authored-By: OpenAI Codex <codex@openai.com>
* fix(flue): Harden issue triage automation
Use a read-only GitHub App token for model-accessible gh commands and keep the write token for deterministic mutations only.
Require duplicate candidates to be high-confidence same-repo issue URLs before automatic closure, and skip issue mutations when human review is required.
Co-Authored-By: OpenAI Codex <codex@openai.com>
* ref(flue): Narrow issue triage scope
Keep duplicate handling, labeling, comments, and repository context while removing title/body rewrite support and repository command execution.
This keeps the triage bot focused on deterministic issue actions with a smaller surface area.
Co-Authored-By: OpenAI Codex <codex@openai.com>
* fix(flue): Use read token for issue context
Read deterministic issue and label context through the read-scoped GitHub App token so normal triage reads do not depend on write permissions. Leave confirmed duplicates for maintainer review if the canonical issue lookup fails, instead of closing with incomplete resolution context.
Co-Authored-By: OpenAI Codex <codex@openai.com>
* fix(flue): Return structured triage update failures
Keep normal issue triage updates from throwing when label or comment mutations fail. Return a human-review result with the failure summary, and report gh CLI capability problems as workflow issues instead of model failures.
Co-Authored-By: OpenAI Codex <codex@openai.com>
* fix(flue): Preserve read-only triage token boundary
Prevent read-only gh commands from inheriting write-scoped GitHub tokens when the read token is missing. Apply the duplicate label only after a duplicate close succeeds so failed closes do not leave open issues marked as duplicates.
Co-Authored-By: OpenAI Codex <codex@openai.com>
* fix(flue): Detect invalid target checkouts
Treat the prepared target repository as unavailable unless the checkout directory contains a Git checkout. This prevents a failed checkout that leaves an empty directory from being passed to the triage model as usable context.
Co-Authored-By: OpenAI Codex <codex@openai.com>
* fix(flue): Checkout targets with app read token
Grant the issue triage read token contents access and use it for target repository checkout. This lets manual dispatch inspect private target repositories instead of silently losing code context under the .github repository token.
Co-Authored-By: OpenAI Codex <codex@openai.com>
* fix(flue): Return structured triage fallback
Catch remaining unhandled triage failures and return a human-review result instead of crashing the workflow. This covers issue context fetch failures outside the narrower duplicate and update handling paths.
Co-Authored-By: OpenAI Codex <codex@openai.com>
* fix(flue): Default triage reads to read token
Use the read-only gh command as the default for JSON reads so future read helpers do not silently inherit write-token access.
Co-Authored-By: OpenAI Codex <codex@openai.com>
* ref(flue): Simplify triage failure summaries
Remove bespoke provider and network error classification from issue triage. Keep the fail-closed path and preserve the actionable gh close capability error, but otherwise use one generic safe failure summary.
Co-Authored-By: OpenAI Codex <codex@openai.com>
* ref(flue): Simplify triage comment intro handling
Remove the first-sentence parser that tried to infer whether model comments already identified the bot persona. Make the handler own the fixed Sentry Intern intro and update the triage skill so model comments only provide the substantive note.
Co-Authored-By: OpenAI Codex <codex@openai.com>
* ci(flue): Require explicit triage repository input
Remove the manual workflow default repository so dispatch runs must choose the target explicitly. Clarify the Flue README with the required organization secrets and variable for issue triage.
Co-Authored-By: OpenAI Codex <codex@openai.com>
* fix(flue): Accept null duplicate search candidates
Allow model JSON to return null for an absent duplicate candidate without rejecting the entire duplicate search result. Keep the existing runtime guard for duplicate status without a candidate and add focused schema coverage.
Co-Authored-By: OpenAI Codex <codex@openai.com>
* fix(flue): Compare duplicate repositories case-insensitively
Treat GitHub repository names as case-insensitive when validating same-repository duplicate candidates. This avoids rejecting a valid duplicate only because the candidate URL used different casing.
Co-Authored-By: OpenAI Codex <codex@openai.com>
* fix(flue): Resolve triage token and repository casing
Create gh command definitions at use time so workflow-provided tokens are not captured before runtime. Normalize target repository casing during workflow validation so allowlist and caller checks behave consistently for GitHub repository names.
Co-Authored-By: OpenAI Codex <codex@openai.com>
* ci(flue): Skip disabled issue triage repositories
Add a job-level gate for the issue triage allowlist so disabled repositories skip before runner work continues. Keep the existing validation step for enabled repositories.
Co-Authored-By: OpenAI Codex <codex@openai.com>
* ci(flue): Keep triage gate case-insensitive
Use explicit repository comparisons for the job-level issue triage allowlist. This keeps the cheap skip path while preserving mixed-case repository input behavior.
Co-Authored-By: OpenAI Codex <codex@openai.com>
* ci(flue): Avoid duplicate triage allowlist
Make the job-level repository gate the single allowlist for issue triage. Keep the validation step focused on enabled repository inputs.
Co-Authored-By: OpenAI Codex <codex@openai.com>
* ref(flue): Simplify triage update review flag
Remove a redundant human-review condition after the earlier human-review return path. Keep the update result driven by actual update failures.
Co-Authored-By: OpenAI Codex <codex@openai.com>
---------
Co-authored-by: GPT-5 Codex <noreply@openai.com>
Co-authored-by: OpenAI Codex <codex@openai.com>1 parent 1dd6078 commit b044ee5
10 files changed
Lines changed: 5380 additions & 2 deletions
File tree
- .agents/skills/issue-triage
- .flue
- agents
- tests
- .github
- flue
- workflows
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
0 commit comments