ci(triage): re-triage issues when needs-info is cleared - #4108
Conversation
Add a hybrid needs-info lifecycle. When the issue author comments on an issue that still carries needs-info, needs-info-response.yml removes the label using the omnigent-ci App token (the default GITHUB_TOKEN would not re-trigger downstream workflows). That removal fires issue-triage.yml's new `unlabeled` trigger, which reads the reporter's follow-up comments, reclassifies, and assigns an owner — re-adding needs-info only if the issue is still too vague. Issues the reporter never clarifies are closed by the existing stale.yml. issue-triage.yml changes: - trigger on issues [opened, unlabeled]; the unlabeled path fires only for needs-info on an open issue, and allows a bot actor (the App) - feed the author's follow-up comments into the triage prompt - remove needs-info on re-triage when the LLM no longer flags it - suppress the duplicate-of comment on the re-triage path - add a per-issue concurrency group Co-authored-by: Isaac
|
There was a problem hiding this comment.
Pull request overview
This PR updates the GitHub issue triage automation to support a “needs-info lifecycle”: when the original reporter replies on a needs-info issue, the label is cleared (using an App token) so the existing triage workflow re-runs and can classify/assign based on the new details.
Changes:
- Add a new
needs-info-response.ymlworkflow to removeneeds-infowhen the issue author comments (using the omnigent-ci App token so downstream workflows re-trigger). - Extend
issue-triage.ymlto re-run onissues: unlabeledspecifically forneeds-inforemoval, include author follow-up comments in the prompt, and avoid duplicate-of re-commenting on re-triage. - Add per-issue concurrency to
issue-triage.ymlto prevent overlapping runs.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| .github/workflows/needs-info-response.yml | New workflow to clear needs-info on issue-author response using an App token so unlabeled triggers downstream triage. |
| .github/workflows/issue-triage.yml | Re-triage on needs-info removal; incorporate author follow-up comments; prevent duplicate-of re-commenting; add concurrency. |
| run: | | ||
| set -euo pipefail | ||
| echo "Author responded on #$ISSUE_NUMBER; removing needs-info to re-triage." | ||
| gh issue edit "$ISSUE_NUMBER" --repo "$REPO" --remove-label needs-info |
There was a problem hiding this comment.
Good catch — fixed in bc04dc5. The removal step now re-checks the live labels (gh issue view --json labels | grep -qx needs-info) before calling --remove-label, so a stale event payload or a race (two quick comments / concurrent removal) no-ops cleanly instead of erroring. Also added a ::notice:: when the App is unconfigured, and suppressed the duplicate label (not just the comment) on the re-triage path per Polly's note.
…tice - needs-info-response.yml: re-check live labels before `gh --remove-label` so a stale event payload / race can't fail the step (gh errors on a missing label); emit a ::notice:: when the omnigent-ci App is unconfigured so a dormant feature is distinguishable from a broken one. - issue-triage.yml: also suppress the `duplicate` label on the re-triage path (not just the comment), keeping the label and its explanation consistent; hoist `import os` to the top of the block. Co-authored-by: Isaac
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.
Suppressed comments (2)
.github/workflows/issue-triage.yml:144
gh issue viewnow always fetches fullcommentsinto /tmp/issue.json, even on the initialopenedpath where there typically aren’t any. On long issues this can significantly increase API payload size and runtime for the common case. Consider only requestingcommentswhen the event isunlabeled(re-triage).
# see the detail the reporter added in comments, not just the original
# body.
gh issue view "$ISSUE_NUMBER" --repo "$REPO" \
--json number,title,body,labels,author,comments \
> /tmp/issue.json
.github/workflows/issue-triage.yml:307
- The author follow-up comment extraction builds and joins all author comment bodies before slicing to 4 KB. On issues with many/large comments this can create unnecessary memory/time overhead (and it’s slightly at odds with the “Capped to 4 KB total” comment). Consider limiting to the most recent N author comments and truncating each before joining.
# Follow-up comments by the issue author — the reporter often supplies
# the missing detail here, so the re-triage path must read them. Only
# the author's own comments count as clarification (others' comments
# are noise for this purpose and are dropped). Capped to 4 KB total.
author_login = issue.get("author", {}).get("login")
|
/review |
|
|
🏷️ Doc impact: Changes are confined to internal GitHub Actions issue-triage automation workflows (CI tooling), which touch no user-facing surface, integration, or built-in policy. Auto-classified on merge. Set the label manually before merging to override. · run |
Related issue
N/A
Summary
Adds a hybrid needs-info lifecycle so an issue the reporter has clarified gets re-triaged and assigned automatically, following the common convention (remove the waiting label on author response; the existing stale bot closes ones nobody answers).
Flow:
needs-info-response.yml— onissue_comment, when a non-bot commenter who is the issue author comments on an open issue that still hasneeds-info, removes the label. Uses the omnigent-ci App token, because a label removed with the defaultGITHUB_TOKENdoes not re-trigger downstream workflows (so re-triage would never fire). Fails closed: if the App isn't configured, it skips rather than silently dropping the label.issue-triage.yml— now triggers onissues: [opened, unlabeled]. Theunlabeledpath fires only forneeds-infoon an open issue and intentionally allows a bot actor (the App's removal). It feeds the author's follow-up comments into the triage prompt, clearsneeds-infowhen the LLM no longer flags it, suppresses the duplicate-of comment on re-triage, and adds a per-issue concurrency group.No loop risk: issue-triage's own label edits use
GITHUB_TOKEN, which never emits re-triggering events.Test Plan
python3 -c "import yaml; yaml.safe_load(open(f))"on both workflows — valid.pre-commit(incl.no-hardcoded-models) passed on commit.needs-infoissue, comment as the author →needs-infoshould drop, then triage re-runs and assigns (or re-addsneeds-info). A comment by anyone else does nothing.Demo
N/A — non-visual (CI workflows).
Type of change
Test coverage
Coverage notes
These workflows have no unit-test harness (consistent with the other GitHub Actions in the repo). Verified by YAML validation, pre-commit, and tracing the trigger/gate/token logic by hand. The App-token dependency (
OMNIGENT_BOT_APP_ID/OMNIGENT_BOT_APP_KEY) is already used by ~16 other workflows.This pull request and its description were written by Isaac.