Skip to content

Commit 2282603

Browse files
committed
Use PAT for API call to prevent throttling
1 parent b945f6e commit 2282603

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

images/macos/scripts/build/install-codeql-bundle.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
source ~/utils/utils.sh
88

99
# Retrieve the latest major version of the CodeQL Action to use in the base URL for downloading the bundle.
10-
releases=$(curl -s "https://api.github.com/repos/github/codeql-action/releases")
10+
[ -n "$API_PAT" ] && authString=(-H "Authorization: token ${API_PAT}")
11+
releases=$(curl "${authString[@]}" -s "https://api.github.com/repos/github/codeql-action/releases")
1112

1213
# Get the release tags starting with v[0-9] and sort them in descending order, then parse the first one to get the major version.
1314
codeql_action_latest_major_version=$(echo "$releases" |

0 commit comments

Comments
 (0)