Repository navigation
ci(release): give the pr step the GITHUB_TOKEN its tool reads, and run e2e tools with their workflow env - #40
Merged
Merged
Conversation
…ves it The harness exported GITHUB_TOKEN to every command, so a workflow step that gave its tool no token still passed the e2e. tool() now exports only the runner's defaults plus the env of the release.yml step that runs the same app, subcommand and flags
The reusable workflow gave github-release-management pr GH_TOKEN, but the tool reads only GITHUB_TOKEN, so creating the release PR failed with 'Requires authentication'. The step now passes GITHUB_TOKEN like the plan, capture and release steps; the gh dispatch step keeps GH_TOKEN
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
stryker-js-effect Release run 37726347961 bumped, committed (as github-actions[bot]) and pushed
changeset-release/main, then failed creating the PR:The reusable
release.ymlgave thegithub-release-management prstepGH_TOKEN(:76onfd4ce35), but the tool reads onlyprocess.env['GITHUB_TOKEN'](apps/github-release-management/src/main.ts:78). Every other tool step (:51,:108,:121) passesGITHUB_TOKEN.Fix
release.yml: the pr step now passesGITHUB_TOKEN: ${{ github.token }}. Thegh workflow rundispatch step keepsGH_TOKEN, which the gh CLI reads. No token-name fallback in the tool:git grep GH_TOKENfinds no other caller passing it to a tool.GITHUB_TOKENto every command, which is why the containerised pipeline passed with the broken step.world.tool(app, sub, args)now runs with only the runner's own defaults (GITHUB_API_URL,GITHUB_REPOSITORY,NO_COLOR) plus theenv:of therelease.ymlstep that runs the same app, subcommand and flag names.e2e/workflow-env.tsreadsrelease.yml(decoded throughe2e/workflow.schema.ts), finds everynix develop --command <app> <sub> ...step, and resolves${{ github.token }}to the emulator's token; an unknown expression throws. So any tool step that lacks a variable its tool reads now failspnpm --filter @systemfsoftware/e2e test, the E2E workflow, exactly as it would on a runner. Calls with no matching step shape (the fixture's 1.0.0 seed tag) get the env of the steps running that subcommand.Failing before
Commits
411d245/e6f0f76carry the guard without the workflow fix.411d245failed ate2e/tests/pipeline.integration.test.ts:271(expect(opened.code).toBe(0)aftergithub-release-management pr).env: {"GH_TOKEN":"test_token_admin"}, exit 1, and printedAfter the fix (
a6ac68c), locally:pnpm --filter @systemfsoftware/e2e testpassed (1/1); both pr calls ran withenv: {"GITHUB_TOKEN":"test_token_admin"}and exited 0.pnpm check:ciexit 0 (72/72, 17/17),dprint checkexit 0.Orphan branch
changeset-release/mainon stryker-js-effect is at5a7bb104(github-actions[bot]) with no open PR. On the next runprdecidesVacant(no open PR for the branch), commits the freshly bumped tree and pushes withgit push --force origin HEAD:refs/heads/changeset-release/main, then creates the PR. So the orphan is refreshed (overwritten) by the bot's own push, not reused as-is; no manual cleanup is needed.No changeset: only the workflow and the private e2e package change. No stryker lock bump: the stryker caller uses
release.yml@main. No file overlap with #28. Nothing was run with stryker.