Skip to content

Commit

Permalink
Use environment variable for GitHub API
Browse files Browse the repository at this point in the history
Use GITHUB_API_URL for the request to the dependency snapshot endpoint so requests work in GitHub Enterprise Server.
  • Loading branch information
martincostello authored May 29, 2024
1 parent 841fb37 commit b44ceb1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ set -e
if [[ "${format}" == "github" ]]; then
if [[ "$(echo $githubPAT | xargs)" != "" ]]; then
printf "\n Uploading GitHub Dependency Snapshot"
curl -H 'Accept: application/vnd.github+json' -H "Authorization: token $githubPAT" 'https://api.github.com/repos/'$GITHUB_REPOSITORY'/dependency-graph/snapshots' -d @./$(echo $output | xargs)
curl -H 'Accept: application/vnd.github+json' -H "Authorization: token $githubPAT" ''$GITHUB_API_URL'/repos/'$GITHUB_REPOSITORY'/dependency-graph/snapshots' -d @./$(echo $output | xargs)
else
printf "\n Failing GitHub Dependency Snapshot. Missing github-pat"
fi
Expand Down

0 comments on commit b44ceb1

Please sign in to comment.