Skip to content

ci: fail safe on triage comment-lookup error#86

Merged
duzos merged 2 commits into
masterfrom
ci/triage-followup
Jun 8, 2026
Merged

ci: fail safe on triage comment-lookup error#86
duzos merged 2 commits into
masterfrom
ci/triage-followup

Conversation

@duzos

@duzos duzos commented Jun 7, 2026

Copy link
Copy Markdown
Owner

Addresses Copilot's review comment on #85.

The CID lookup used 2>/dev/null || true, which conflated two cases:

  • lookup succeeded and found no marker -> genuinely first triage
  • lookup failed (transient api/auth/network) -> unknown

In the failure case CID went empty and the run defaulted to FIRST_TRIAGE=true, so a flaky API call could re-apply labels/fields and clobber a maintainer's edits - exactly what the non-clobber logic is meant to prevent.

Now the lookup's exit status is checked: on success it parses the marker id as before; on failure it fails safe - treats the run as a re-triage (no label/field changes) and posts a fresh comment if needed.

Copilot AI review requested due to automatic review settings June 7, 2026 23:57
@github-actions github-actions Bot added S: Untriaged Status: Indicates an item has not been triaged and doesn't have appropriate labels. size/S Denotes a PR that changes 10-99 lines. C: No Java Changes: Requires no Java knowledge to review or fix this item. A: Build Area: Gradle, publishing, and dependency consumption. and removed S: Untriaged Status: Indicates an item has not been triaged and doesn't have appropriate labels. size/S Denotes a PR that changes 10-99 lines. labels Jun 7, 2026
@duzos duzos added T: Bugfix Type: Bugs and/or bugfixes. P3: Standard Priority: Default priority for repository items. labels Jun 7, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR hardens the issue triage GitHub Actions workflow so that failures during the “find existing triage comment” lookup don’t accidentally trigger “first triage” behavior that could re-apply labels/fields and overwrite maintainer changes.

Changes:

  • Reworks the triage-comment lookup to check gh api exit status instead of masking failures with || true.
  • Fails safe on lookup errors by treating the run as a re-triage (comment refresh only; no label/field changes).
  • Adds parsing to robustly extract the most recent matching comment id from paginated output.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/issue-triage.yml Outdated
@github-actions github-actions Bot added the size/S Denotes a PR that changes 10-99 lines. label Jun 8, 2026
@duzos duzos requested a review from Copilot June 8, 2026 00:00

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

Comment thread .github/workflows/issue-triage.yml
@duzos duzos merged commit aa3bb16 into master Jun 8, 2026
3 checks passed
@duzos duzos deleted the ci/triage-followup branch June 8, 2026 00:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A: Build Area: Gradle, publishing, and dependency consumption. C: No Java Changes: Requires no Java knowledge to review or fix this item. P3: Standard Priority: Default priority for repository items. size/S Denotes a PR that changes 10-99 lines. T: Bugfix Type: Bugs and/or bugfixes.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants