Skip to content

feat: pass a github.com token to renovate-run - #91

Merged
NickGraham101 merged 1 commit into
mainfrom
RenovateGitHubComToken
Oct 28, 2026
Merged

NickGraham101 merged 1 commit into
mainfrom
RenovateGitHubComToken

Conversation

@NickGraham101

@NickGraham101 NickGraham101 commented Oct 27, 2026 •

Copy link
Copy Markdown
Owner

Problem

Renovate runs without a github.com token, so its node/npm/yarn downloads hit the anonymous api.github.com rate limit. When that happens, npm/yarn PRs are raised without their lock files (artifactErrors).

Change

  • New GitHubComToken parameter, passed to Renovate as RENOVATE_GITHUB_COM_TOKEN.
  • New Check GitHub Token step runs PSScripts/Test-GitHubComToken.ps1 before Renovate:
    • If the token is missing, expired or revoked, the run fails and posts a Slack alert.
    • If the token expires within GitHubComTokenExpiryWarningDays (default 14), it posts a Slack warning and Renovate still runs.

Consumers must pass GitHubComToken.

Testing

  • 9 Pester tests cover each branch, with the GitHub API and Slack webhook mocked.
  • PSScriptAnalyzer quality tests pass.

🤖 Generated with Claude Code

@github-actions

github-actions Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Unit Test Results

1 220 tests  +84   1 220 ✔️ +84   30s ⏱️ +2s
       4 suites +  1          0 💤 ±  0 
       1 files   ±  0          0 ❌ ±  0 

Results for commit c92ceab. ± Comparison against base commit b6fb470.

♻️ This comment has been updated with latest results.

Without a token Renovate downloads node/npm/yarn anonymously from
api.github.com, hits the rate limit on hosted agents and raises npm/yarn
PRs without their lock files (artifactErrors).

- New GitHubComToken parameter, passed to Renovate as
  RENOVATE_GITHUB_COM_TOKEN.
- New Check GitHub Token step runs PSScripts/Test-GitHubComToken.ps1
  first: a missing, expired or revoked token fails the run with a Slack
  alert; a token expiring within GitHubComTokenExpiryWarningDays (14)
  posts a Slack warning.
- Pester tests cover each branch, mocking the GitHub API and Slack.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@NickGraham101
NickGraham101 force-pushed the RenovateGitHubComToken branch from b3ca209 to c92ceab Compare October 28, 2026 08:04
@NickGraham101
NickGraham101 merged commit edb3038 into main Oct 28, 2026
4 checks passed
@NickGraham101
NickGraham101 deleted the RenovateGitHubComToken branch October 28, 2026 08:14
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.

1 participant