Skip to content

ci: make PR triage react to reviews and survive transient errors#3260

Merged
hubcio merged 1 commit into
masterfrom
improve-triage
May 14, 2026
Merged

ci: make PR triage react to reviews and survive transient errors#3260
hubcio merged 1 commit into
masterfrom
improve-triage

Conversation

@hubcio
Copy link
Copy Markdown
Contributor

@hubcio hubcio commented May 14, 2026

A transient 502 on a label DELETE aborted the whole command:
removeLabelIfPresent only swallowed 404, so the rethrow skipped
the paired addLabels and left the PR in a state the lifecycle
hooks never re-enter. A /author placed in a review body never
reached the bot at all -- only issue_comment and
pull_request_target were triggers. And commands gave no visible
feedback, so a rejected one looked identical to one that worked.

Wrap every GitHub API call in withRetry (bounded exponential
backoff over 5xx/429/network errors; 4xx still surfaces
immediately). Add the pull_request_review trigger so review
bodies are parsed like comments, and treat a changes_requested
review by a committer as an implicit /author. React on the
comment (+1 applied, confused denied) and post a one-line reply
when /request-review is rejected.

setLabels rollback now only re-adds the removed label when the
remove actually deleted one -- re-adding unconditionally would
fabricate a label on a PR that had neither S-* label.

A transient 502 on a label DELETE aborted the whole command:
removeLabelIfPresent only swallowed 404, so the rethrow skipped
the paired addLabels and left the PR in a state the lifecycle
hooks never re-enter. A /author placed in a review body never
reached the bot at all -- only issue_comment and
pull_request_target were triggers. And commands gave no visible
feedback, so a rejected one looked identical to one that worked.

Wrap every GitHub API call in withRetry (bounded exponential
backoff over 5xx/429/network errors; 4xx still surfaces
immediately). Add the pull_request_review trigger so review
bodies are parsed like comments, and treat a changes_requested
review by a committer as an implicit /author. React on the
comment (+1 applied, confused denied) and post a one-line reply
when /request-review is rejected.

setLabels rollback now only re-adds the removed label when the
remove actually deleted one -- re-adding unconditionally would
fabricate a label on a PR that had neither S-* label.
@github-actions github-actions Bot added the S-waiting-on-review PR is waiting on a reviewer label May 14, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented May 14, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 73.84%. Comparing base (50724fd) to head (371051f).

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #3260      +/-   ##
============================================
- Coverage     73.86%   73.84%   -0.03%     
  Complexity      943      943              
============================================
  Files          1193     1193              
  Lines        108970   108970              
  Branches      85987    86004      +17     
============================================
- Hits          80496    80467      -29     
- Misses        25739    25743       +4     
- Partials       2735     2760      +25     
Components Coverage Δ
Rust Core 74.91% <ø> (-0.02%) ⬇️
Java SDK 60.14% <ø> (ø)
C# SDK 69.13% <ø> (-0.31%) ⬇️
Python SDK 81.43% <ø> (ø)
Node SDK 91.41% <ø> (ø)
Go SDK 39.80% <ø> (ø)
see 18 files with indirect coverage changes
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@hubcio hubcio merged commit 5e98ec9 into master May 14, 2026
84 checks passed
@hubcio hubcio deleted the improve-triage branch May 14, 2026 14:42
@github-actions github-actions Bot removed the S-waiting-on-review PR is waiting on a reviewer label May 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants