diff --git a/.github/workflows/doc_review.yml b/.github/workflows/doc_review.yml index 79614b63b3d24..6c08c644214bb 100644 --- a/.github/workflows/doc_review.yml +++ b/.github/workflows/doc_review.yml @@ -20,16 +20,9 @@ jobs: ( github.event_name == 'issue_comment' && contains(github.event.comment.body, '/bot-review') && - contains('hfxsd,likidu,lilin90,Oreoxmt,qiancai', github.event.comment.user.login) + (github.event.comment.user.login == 'hfxsd' || github.event.comment.user.login == 'likidu' || github.event.comment.user.login == 'lilin90' || github.event.comment.user.login == 'Oreoxmt' || github.event.comment.user.login == 'qiancai') ) steps: - - name: Debug Info - run: | - echo "Event name: ${{ github.event_name }}" - echo "Event type: ${{ github.event.action }}" - echo "Comment body: ${{ github.event.comment.body || 'No comment body' }}" - echo "Comment author: ${{ github.event.comment.user.login || 'No user' }}" - - name: Checkout Repo uses: actions/checkout@v3 with: @@ -40,20 +33,19 @@ jobs: if: github.event_name == 'issue_comment' run: | COMMENT="${{ github.event.comment.body }}" - echo "Raw comment: $COMMENT" # Match commit range if [[ "$COMMENT" =~ \/bot-review:[[:space:]]*([a-f0-9]{7,40})[[:space:]]*\.\.[[:space:]]*([a-f0-9]{7,40}) ]]; then echo "BASE_SHA=${BASH_REMATCH[1]}" >> $GITHUB_OUTPUT echo "HEAD_SHA=${BASH_REMATCH[2]}" >> $GITHUB_OUTPUT echo "REVIEW_MODE=commit_range" >> $GITHUB_OUTPUT - echo "Detected commit range with regex: ${BASH_REMATCH[1]}..${BASH_REMATCH[2]}" + printf "Detected commit range with regex: %s..%s\\n" "${BASH_REMATCH[1]}" "${BASH_REMATCH[2]}" # Match a single commit elif [[ "$COMMENT" =~ \/bot-review:[[:space:]]+([a-f0-9]{7,40}) ]]; then echo "COMMIT_SHA=${BASH_REMATCH[1]}" >> $GITHUB_OUTPUT echo "REVIEW_MODE=single_commit" >> $GITHUB_OUTPUT - echo "Detected single commit: ${BASH_REMATCH[1]}" + printf "Detected single commit: %s\\n" "${BASH_REMATCH[1]}" # Match "/bot-review" or "/bot-review " elif [[ "$COMMENT" =~ ^\/bot-review[[:space:]]*$ ]]; then