File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments