Skip to content

fix: Add ACTIONS_BOT_TOKEN and VBOT_GITHUB_API_TOKEN to token check#167

Merged
JakeSCahill merged 4 commits intomainfrom
fix/shared-octokit-and-token-support
Jan 21, 2026
Merged

fix: Add ACTIONS_BOT_TOKEN and VBOT_GITHUB_API_TOKEN to token check#167
JakeSCahill merged 4 commits intomainfrom
fix/shared-octokit-and-token-support

Conversation

@JakeSCahill
Copy link
Contributor

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)

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)
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 21, 2026

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

📝 Walkthrough

Walkthrough

The PR modifies the environment variable priority chain in the getGitHubToken() function within cli-utils/github-token.js. The updated token selection order is: ACTIONS_BOT_TOKEN, GITHUB_TOKEN, VBOT_GITHUB_API_TOKEN, and GH_TOKEN. The function's public API remains unchanged, and the modification updates only the comment documentation and the conditional evaluation order for token selection.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~5 minutes

Possibly related PRs

Suggested reviewers

  • andrewhsu
  • paulohtb6
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: adding two new GitHub tokens (ACTIONS_BOT_TOKEN and VBOT_GITHUB_API_TOKEN) to the token check logic.
Description check ✅ Passed The description is directly related to the changeset, explaining the problem (missing token support), the impact (rate limiting issues), and the solution (adding tokens with priority order).
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@netlify
Copy link

netlify bot commented Jan 21, 2026

Deploy Preview for docs-extensions-and-macros ready!

Name Link
🔨 Latest commit 71755f7
🔍 Latest deploy log https://app.netlify.com/projects/docs-extensions-and-macros/deploys/69709d99796649000866843d
😎 Deploy Preview https://deploy-preview-167--docs-extensions-and-macros.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@JakeSCahill JakeSCahill requested a review from paulohtb6 January 21, 2026 09:20
Use GitHub Tree API to fetch entire directory structure in a single API call
instead of checking each connector individually. This reduces API calls from
471 to 1, making the check ~108x faster (from 30-60s to ~280ms).

Changes:
- Fetch recursive tree of modules/develop/pages/connect/components/
- Build in-memory set of existing files for O(1) lookup
- Check connectors against this set (no additional API calls)
- Graceful fallback to individual checks if tree API fails

Performance:
- OLD: 471 individual API calls (~30-60 seconds)
- NEW: 1 tree API call (~280ms)
- Speedup: 108x faster
Replace emoji characters with standard text labels (INFO, WARNING) for
better compatibility and cleaner log output.
@JakeSCahill JakeSCahill merged commit de2d9c7 into main Jan 21, 2026
20 checks passed
@JakeSCahill JakeSCahill deleted the fix/shared-octokit-and-token-support branch January 21, 2026 17:03
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.

2 participants