Skip to content

Throttle release PR comment posting to avoid secondary rate limits#46081

Merged
pelikhan merged 2 commits into
mainfrom
copilot/add-delay-between-pr-comments
Jul 16, 2026
Merged

Throttle release PR comment posting to avoid secondary rate limits#46081
pelikhan merged 2 commits into
mainfrom
copilot/add-delay-between-pr-comments

Conversation

Copilot AI commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Release automation is posting comments to merged PRs too quickly and intermittently hitting GitHub secondary write-rate limits (403 on issues.createComment). This change adds pacing between comment writes so the release comment pass can complete more reliably on large releases.

  • What changed

    • Added an explicit inter-comment delay in comment_release_prs within the release workflow script.
    • Delay is applied only when a new release comment is about to be created (not for already-marked PRs), preserving skip behavior and existing retry semantics.
    • Recompiled workflow output so release.lock.yml matches release.md.
  • Behavioral impact

    • Comment throughput is intentionally reduced to lower burst pressure on GitHub’s content-creation limits.
    • Existing duplicate-detection marker logic and retry/backoff flow remain intact.
const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
const commentDelayMs = 1000;

if (commentedCount > 0) {
  await sleep(commentDelayMs);
}

await withRetry(
  () => github.rest.issues.createComment({ owner, repo, issue_number: pr.number, body: commentBody }),
  `Creating release comment for #${pr.number}`
);

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title Add delay between release PR comments to reduce rate limiting Throttle release PR comment posting to avoid secondary rate limits Jul 16, 2026
Copilot AI requested a review from pelikhan July 16, 2026 19:55
@pelikhan
pelikhan marked this pull request as ready for review July 16, 2026 21:12
Copilot AI review requested due to automatic review settings July 16, 2026 21:12
@pelikhan
pelikhan merged commit f31ec97 into main Jul 16, 2026
18 checks passed
@pelikhan
pelikhan deleted the copilot/add-delay-between-pr-comments branch July 16, 2026 21:12

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

Adds pacing to release PR comments to reduce GitHub secondary rate-limit failures.

Changes:

  • Waits one second between newly created comments.
  • Preserves duplicate detection and retry behavior.
  • Recompiles the generated workflow.
Show a summary per file
File Description
.github/workflows/release.md Adds inter-comment throttling.
.github/workflows/release.lock.yml Updates compiled workflow output.

Review details

Tip

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

  • Files reviewed: 2/2 changed files
  • Comments generated: 0
  • Review effort level: Medium

@github-actions

Copy link
Copy Markdown
Contributor

🎉 This pull request is included in a new release.

Release: v0.82.12

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