Skip to content

Commit fcf54d4

Browse files
committed
Try using a PAT
1 parent 2720e86 commit fcf54d4

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

.github/workflows/spelling.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,5 @@ jobs:
1414
bucket: ssh://git@github.com/check-spelling/examples.git
1515
project: spelling-data-lorem
1616
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
17+
CHECK_SPELLING_BOT_TOKEN: ${{ secrets.CHECK_SPELLING_BOT_TOKEN }}
1718
DEBUG: 1

test-spelling-unknown-words

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,8 +250,14 @@ comment() {
250250
if [ -n "$COMMENTS_URL" ] && [ -z "${COMMENTS_URL##*:*}" ]; then
251251
echo $PAYLOAD
252252
echo $COMMENTS_URL
253-
curl -s -S -H "Authorization: token $GITHUB_TOKEN" --header "Content-Type: application/json" -H 'Accept: application/vnd.github.comfort-fade-preview+json
253+
submit() {
254+
curl -s -S -H "Authorization: token $1" --header "Content-Type: application/json" -H 'Accept: application/vnd.github.comfort-fade-preview+json
254255
' --data "$PAYLOAD" "$COMMENTS_URL"
256+
}
257+
submit "$GITHUB_TOKEN" > $temp/post
258+
if grep -q 'Resource not accessible by integration' $temp/post; then
259+
submit "$CHECK_SPELLING_BOT_TOKEN"
260+
fi
255261
else
256262
echo "$OUTPUT"
257263
fi

0 commit comments

Comments
 (0)