Skip to content

Commit 0a5dad3

Browse files
committed
Allow authenticating via the GitHub CLI
We no longer run this script within Actions for security reasons, and when running locally we can authenticate with the GitHub CLI instead of a PAT.
1 parent d61e3fd commit 0a5dad3

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

.github/workflows/script/update-required-checks.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
# Update the required checks based on the current branch.
33
# Typically, this will be main.
44

5-
if [ -z "$GITHUB_TOKEN" ]; then
5+
if ! gh auth status 2>/dev/null; then
6+
gh auth status
67
echo "Failed: No GitHub token found. This script requires admin access to github/codeql-action."
78
exit 1
89
fi

0 commit comments

Comments
 (0)