Skip to content

Commit 9db83ea

Browse files
committed
fix: Add ACTIONS_BOT_TOKEN and VBOT_GITHUB_API_TOKEN to token check
The getGitHubToken() helper was missing ACTIONS_BOT_TOKEN (used in CI) and VBOT_GITHUB_API_TOKEN (used in legacy code), causing authentication to fail and hitting unauthenticated rate limits (60 req/hr instead of 5000 req/hr). This was causing 403/429 errors when checking cloud-docs for 471 connectors. Updated token priority order: 1. REDPANDA_GITHUB_TOKEN 2. ACTIONS_BOT_TOKEN (CI) 3. GITHUB_TOKEN (GitHub Actions default) 4. VBOT_GITHUB_API_TOKEN (legacy) 5. GH_TOKEN (GitHub CLI)
1 parent 8e286a7 commit 9db83ea

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

cli-utils/github-token.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,18 @@
99
* Get GitHub token from environment variables
1010
* Checks multiple common variable names in priority order:
1111
* 1. REDPANDA_GITHUB_TOKEN - Custom Redpanda token
12-
* 2. GITHUB_TOKEN - GitHub Actions default
13-
* 3. GH_TOKEN - GitHub CLI default
12+
* 2. ACTIONS_BOT_TOKEN - GitHub Actions bot token
13+
* 3. GITHUB_TOKEN - GitHub Actions default
14+
* 4. VBOT_GITHUB_API_TOKEN - Legacy bot token
15+
* 5. GH_TOKEN - GitHub CLI default
1416
*
1517
* @returns {string|null} GitHub token or null if not found
1618
*/
1719
function getGitHubToken() {
1820
return process.env.REDPANDA_GITHUB_TOKEN ||
21+
process.env.ACTIONS_BOT_TOKEN ||
1922
process.env.GITHUB_TOKEN ||
23+
process.env.VBOT_GITHUB_API_TOKEN ||
2024
process.env.GH_TOKEN ||
2125
null;
2226
}

0 commit comments

Comments
 (0)