diff --git a/.github/workflows/docs_suggestions.yml b/.github/workflows/docs_suggestions.yml index fc55617edc7973a41b8dc80a852162dd0fb0b7a1..be1229e5fec12cc5c7ac0b03a5390eac3dc692d0 100644 --- a/.github/workflows/docs_suggestions.yml +++ b/.github/workflows/docs_suggestions.yml @@ -94,6 +94,9 @@ jobs: - name: Analyze PR for documentation needs id: analyze run: | + # Ensure gh CLI is authenticated (GH_TOKEN may not be auto-detected) + echo "$GH_TOKEN" | gh auth login --with-token + OUTPUT_FILE=$(mktemp) ./script/docs-suggest \ @@ -119,13 +122,13 @@ jobs: - name: Commit suggestions to queue branch if: steps.analyze.outputs.has_suggestions == 'true' + env: + PR_NUM: ${{ steps.pr.outputs.number }} + PR_TITLE: ${{ steps.pr.outputs.title }} + OUTPUT_FILE: ${{ steps.analyze.outputs.output_file }} run: | set -euo pipefail - PR_NUM="${{ steps.pr.outputs.number }}" - PR_TITLE="${{ steps.pr.outputs.title }}" - OUTPUT_FILE="${{ steps.analyze.outputs.output_file }}" - # Configure git git config user.name "github-actions[bot]" git config user.email "github-actions[bot]@users.noreply.github.com" @@ -264,6 +267,9 @@ jobs: - name: Analyze PR for documentation needs id: analyze run: | + # Ensure gh CLI is authenticated (GH_TOKEN may not be auto-detected) + echo "$GH_TOKEN" | gh auth login --with-token + OUTPUT_FILE=$(mktemp) # Cherry-picks don't get preview callout