Skip to content

Commit

Permalink
Allow authenticating via the GitHub CLI
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
henrymercer committed Jul 12, 2022
1 parent d61e3fd commit 0a5dad3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/script/update-required-checks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
# Update the required checks based on the current branch.
# Typically, this will be main.

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

0 comments on commit 0a5dad3

Please sign in to comment.