Skip to content

Commit ac687f2

Browse files
Copilotdiberry
andcommitted
Update GitHub API to use current REST API version
Co-authored-by: diberry <[email protected]>
1 parent c0ae7dd commit ac687f2

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

.github/workflows/validate-workflows.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,8 @@ jobs:
118118
API_URL="https://api.github.com/repos/$ACTION_PATH"
119119
RESPONSE=$(curl -s -w "\n%{http_code}" \
120120
-H "Authorization: token $GITHUB_TOKEN" \
121-
-H "Accept: application/vnd.github.v3+json" \
121+
-H "Accept: application/vnd.github+json" \
122+
-H "X-GitHub-Api-Version: 2022-11-28" \
122123
"$API_URL")
123124
124125
HTTP_CODE=$(echo "$RESPONSE" | tail -n1)
@@ -129,7 +130,8 @@ jobs:
129130
# Try to fetch latest release for comparison
130131
RELEASE_RESPONSE=$(curl -s \
131132
-H "Authorization: token $GITHUB_TOKEN" \
132-
-H "Accept: application/vnd.github.v3+json" \
133+
-H "Accept: application/vnd.github+json" \
134+
-H "X-GitHub-Api-Version: 2022-11-28" \
133135
"$API_URL/releases/latest")
134136
135137
LATEST_RELEASE=$(echo "$RELEASE_RESPONSE" | jq -r '.tag_name // empty')

0 commit comments

Comments
 (0)