diff --git a/.github/workflows/check_author.sh b/.github/workflows/check_author.sh index 70fbff79..0b03a20f 100644 --- a/.github/workflows/check_author.sh +++ b/.github/workflows/check_author.sh @@ -1,4 +1,6 @@ -#!/bin/bash -x +#!/bin/bash + +set -x # Fetch the PR author's email PR_AUTHOR_EMAIL=$(jq -r ".pull_request.user.email" "$GITHUB_EVENT_PATH") @@ -12,5 +14,5 @@ else PAYLOAD=$(jq -n --arg body "$COMMENT" '{body: $body}') COMMENTS_URL=$(jq -r .pull_request.comments_url "$GITHUB_EVENT_PATH") - curl -s -S -H "Authorization: token $GITHUB_TOKEN" --header "Content-Type: application/json" --data "$PAYLOAD" "$COMMENTS_URL" + curl -s -S -H "Authorization: Bearer $GITHUB_TOKEN" --header "Content-Type: application/json" --data "$PAYLOAD" "$COMMENTS_URL" fi diff --git a/.github/workflows/pr-author-check.yml b/.github/workflows/pr-author-check.yml index 60aa5d01..d616d2b1 100644 --- a/.github/workflows/pr-author-check.yml +++ b/.github/workflows/pr-author-check.yml @@ -15,4 +15,4 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - sh .github/workflows/check_author.sh \ No newline at end of file + sh -x .github/workflows/check_author.sh \ No newline at end of file