Skip to content

Commit c739ba4

Browse files
authored
Merge pull request #126 from Googlom/patch-1
fix: enable GitHub API requests to work with GHES
2 parents 9c38288 + 4ccf5d2 commit c739ba4

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/get-deployed-commit.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ fi
1717
# Get the latest commit SHA from the deployment branch
1818
DEPLOYED_SHA=$(curl -s -H "Authorization: token $DEPLOY_TOKEN" \
1919
-H "Accept: application/vnd.github.v3+json" \
20-
"https://api.github.com/repos/$DEPLOY_REPO/git/refs/heads/$DEPLOY_BRANCH" \
20+
"$GITHUB_API_URL/repos/$DEPLOY_REPO/git/refs/heads/$DEPLOY_BRANCH" \
2121
| grep -o '"sha": "[^"]*"' | head -1 | cut -d'"' -f4)
2222

2323
if [ -z "$DEPLOYED_SHA" ]; then

lib/wait-for-pages-deployment.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ wait_for_pages_deployment() {
5151
-H "Authorization: Bearer $TOKEN" \
5252
-H "Accept: application/vnd.github+json" \
5353
-H "X-GitHub-Api-Version: 2022-11-28" \
54-
"https://api.github.com/repos/$REPO/pages/builds?per_page=100"
54+
"$GITHUB_API_URL/repos/$REPO/pages/builds?per_page=100"
5555
)
5656

5757
# Get the build ID for this commit SHA if present

0 commit comments

Comments
 (0)