Skip to content

Commit e6ae353

Browse files
authored
fix(ci): restore GH_TOKEN for gh CLI steps in generate-patches (#634)
## Summary - Restores `GH_TOKEN: ${{ github.token }}` env for all `gh` CLI steps in `generate-patches` job - Also restores it for the `eval-skill` fork check step that was inadvertently removed in #618 `gh` CLI supports both `GH_TOKEN` and `GITHUB_TOKEN` as env vars, but GitHub Actions does not automatically expose `GITHUB_TOKEN` as a shell environment variable — it's only available in `${{ }}` expressions. The token must be explicitly mapped via `env:` for `gh` to find it. This fixes the `generate-patches` failure on `release/0.24.0`: https://github.com/getsentry/cli/actions/runs/23875917691/job/69619096534
1 parent 3300c0e commit e6ae353

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,8 @@ jobs:
152152
fi
153153
- name: Check fork eval status
154154
if: steps.detect-fork.outputs.is_fork == 'true'
155+
env:
156+
GH_TOKEN: ${{ github.token }}
155157
run: |
156158
SHA="${{ github.event.pull_request.head.sha }}"
157159
STATUS=$(gh api "repos/${{ github.repository }}/commits/$SHA/statuses" \
@@ -390,6 +392,8 @@ jobs:
390392
391393
- name: Download previous release binaries (release/**)
392394
if: startsWith(github.ref, 'refs/heads/release/')
395+
env:
396+
GH_TOKEN: ${{ github.token }}
393397
run: |
394398
PREV_TAG=$(gh api "repos/${{ github.repository }}/releases?per_page=5" \
395399
--jq '[.[] | select(.prerelease == false and .draft == false)] | .[0].tag_name // empty')
@@ -447,6 +451,8 @@ jobs:
447451

448452
- name: File issue on failure
449453
if: failure()
454+
env:
455+
GH_TOKEN: ${{ github.token }}
450456
run: |
451457
TITLE="Delta patch generation failed"
452458
BODY="The \`generate-patches\` job failed on [\`${GITHUB_REF_NAME}\`](${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}).

0 commit comments

Comments
 (0)