File tree Expand file tree Collapse file tree 3 files changed +11
-3
lines changed
Expand file tree Collapse file tree 3 files changed +11
-3
lines changed Original file line number Diff line number Diff line change 1313 # followed by Error: Could not delete obsolete instance handle Error: ENOENT: no such file or directory, unlink <path>
1414 AWS_TOOLKIT_TEST_CACHE_DIR : ' /tmp/.vscode-test/'
1515 AWS_TOOLKIT_TEST_USER_DIR : ' /tmp/.vscode-test/user-data/'
16- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
16+ # GITHUB_TOKEN should be set in the CodeBuild project environment variables
17+ # or passed as a parameter to the build
1718
1819phases :
1920 install :
@@ -26,6 +27,7 @@ phases:
2627 pre_build :
2728 commands :
2829 - export HOME=/home/codebuild-user
30+ # produce an API key, set the GITHUB_TOKEN environment var, and vscode-ripgrep will pick it up
2931 - export GITHUB_TOKEN=${GITHUB_TOKEN}
3032 - bash buildspec/shared/linux-pre_build.sh
3133
Original file line number Diff line number Diff line change 88 AWS_TOOLKIT_TEST_USER_DIR : ' /tmp/'
99 # needed or else webpack will cause it to run out of memory
1010 NODE_OPTIONS : ' --max-old-space-size=8192'
11- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
1211
1312phases :
1413 install :
@@ -21,7 +20,7 @@ phases:
2120 pre_build :
2221 commands :
2322 - export HOME=/home/codebuild-user
24- - export GITHUB_TOKEN=${GITHUB_TOKEN }
23+ - export GITHUB_TOKEN=${GITHUB_READONLY_TOKEN }
2524 - bash buildspec/shared/linux-pre_build.sh
2625
2726 build :
Original file line number Diff line number Diff line change @@ -11,6 +11,13 @@ _SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
1111# Include common functions.
1212. " ${_SCRIPT_DIR} /common.sh"
1313
14+ # Set up GitHub token for vscode-ripgrep to avoid rate limiting
15+ if [ -n " $GITHUB_TOKEN " ]; then
16+ echo " GITHUB_TOKEN is set. vscode-ripgrep will use this for GitHub API authentication."
17+ else
18+ echo " WARNING: GITHUB_TOKEN is not set. GitHub API requests may be rate-limited."
19+ fi
20+
1421# If present, log into CodeArtifact. Provides a fallback in case NPM is down.
1522# Should only affect tests run through Toolkits-hosted CodeBuild.
1623if [ " $TOOLKITS_CODEARTIFACT_DOMAIN " ] && [ " $TOOLKITS_CODEARTIFACT_REPO " ] && [ " $TOOLKITS_ACCOUNT_ID " ]; then
You can’t perform that action at this time.
0 commit comments