Skip to content

fix(ci): retry transient GitHub API errors in PR automation - #198

Merged
afeezorobsco-cyber merged 1 commit into
mainfrom
fix/automation-api-retries
Oct 20, 2026
Merged

afeezorobsco-cyber merged 1 commit into
mainfrom
fix/automation-api-retries

Conversation

@afeezorobsco-cyber

Copy link
Copy Markdown
Contributor

Today the conflict notifier failed three times on transient GitHub errors (web: 503 on GET /pulls/161, then 500 on POST /issues/189/labels; escrow: 500 on POST /issues/160/comments). Each failure aborted the whole run, so PRs after the failing one weren't labelled or notified until a manual re-run.

  • pr-conflict-notifier.yml and pr-malware-scan.yml: retries: 3 on actions/github-script. The built-in Octokit retry plugin then retries 5xx responses; 4xx are never retried.
  • pr-conflict-notifier.cjs: each PR is processed in its own try/catch. A PR whose calls still fail is logged with core.warning and listed under "API error, retried next run" in the run summary, and the rest carry on. The mergeability prefetch uses Promise.allSettled.
  • ROADMAP changelog line.

The malware scan runs as pull_request_target, so its retry setting takes effect once this is on main.

Tested with a fake client that returns a 500 on one PR's addLabels: the other PRs were still notified and unlabelled, and the failing PR was reported under the new summary line.

🤖 Generated with Claude Code

@github-actions

github-actions Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Malware scan: passed, with notes for the reviewer

Nothing malicious was detected in cf2dc19. These changes touch sensitive areas and should get a careful look before CI is approved:

Where Rule Why
.github/workflows/pr-conflict-notifier.yml:44 workflow-change Changes a CI workflow; a maintainer must review before approving runs.
.github/workflows/pr-malware-scan.yml:59 workflow-change Changes a CI workflow; a maintainer must review before approving runs.

@github-actions github-actions Bot added the needs-rebase Has merge conflicts with main; the author needs to rebase label Oct 20, 2026
@github-actions

Copy link
Copy Markdown

@afeezorobsco-cyber This PR now has merge conflicts with main, most likely because #197 (fix(backups): make the backup restore drill actually run; unique sessions test port) was just merged, so it can't be merged until it's rebased:

git fetch upstream            # upstream = https://github.com/DocForum/docforum-core.git
git rebase upstream/main
# resolve the conflicts, re-run the tests, then:
git push --force-with-lease

The usual culprits are shared files like ROADMAP.md and ARCHITECTURE*.md. CI re-runs when you push, and the needs-rebase label is removed automatically once the conflicts are resolved.

Automated message. It won't repeat unless the PR conflicts again after your next push.

A single 500/503 from the GitHub API aborted the whole conflict-notifier
run, so the PRs after it were never labelled or notified. Set
`retries: 3` on actions/github-script in pr-conflict-notifier.yml and
pr-malware-scan.yml so 5xx responses are retried, and isolate each PR
in the notifier: a PR whose calls still fail is logged as a warning and
picked up on the next run, while the others are processed normally.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@afeezorobsco-cyber
afeezorobsco-cyber force-pushed the fix/automation-api-retries branch from ee830de to cf2dc19 Compare October 20, 2026 15:24
@afeezorobsco-cyber
afeezorobsco-cyber merged commit 2ecba1f into main Oct 20, 2026
2 checks passed
@afeezorobsco-cyber
afeezorobsco-cyber deleted the fix/automation-api-retries branch October 20, 2026 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-rebase Has merge conflicts with main; the author needs to rebase

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant