Skip to content

ci: pass git-token and forge to release-plz#274

Merged
zeitlinger merged 2 commits intomainfrom
fix/release-plz-git-token
May 8, 2026
Merged

ci: pass git-token and forge to release-plz#274
zeitlinger merged 2 commits intomainfrom
fix/release-plz-git-token

Conversation

@zeitlinger
Copy link
Copy Markdown
Member

Summary

  • Pass --git-token and --forge github to release-plz release and release-plz release-pr from the workflow as usage args.
  • Extract release:pr from inline mise.toml to .mise/tasks/release/pr so it can forward variadic args the same way release:create already does.

Why

release-plz 0.3.x requires explicit --git-token and --forge for both release and release-pr. Without them, both fail with:

ERROR git release not configured. Did you specify git-token and forge?

Every release-plz workflow run since #234 has been failing for that reason, leaving release PR #242 stuck on its 2026-04-28 snapshot. After this merges, the next push to main will refresh #242 with all merged commits since.

Test plan

  • CI green on this PR
  • After merge, next push to main refreshes chore: release v0.22.0 #242 with all merged commits + correct version bump (note: #270 was refactor! so the bump should be a major increment per release-plz semantics)

release-plz 0.3.x requires explicit --git-token and --forge for
release/release-pr, otherwise both fail with "git release not
configured. Did you specify git-token and forge?". Every release-plz
run since #234 has been failing for that reason, leaving release PR
#242 stuck on its 2026-04-28 snapshot.

Pass the token through as a usage arg from the workflow rather than
relying on env-var auto-detection. Extract release:pr from inline
mise.toml to its own script so it can forward variadic args the same
way release:create already does.
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
@zeitlinger zeitlinger marked this pull request as ready for review May 8, 2026 13:26
@zeitlinger zeitlinger requested a review from a team as a code owner May 8, 2026 13:26
Copilot AI review requested due to automatic review settings May 8, 2026 13:26
martincostello
martincostello previously approved these changes May 8, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the release management workflow to accommodate release-plz 0.3.x requiring explicit git authentication/forge parameters, and refactors the release:pr mise task into a standalone task file to support variadic argument forwarding.

Changes:

  • Pass --git-token and --forge github through to release-plz release and release-plz release-pr via mise task args in the GitHub Actions workflow.
  • Move release:pr from inline mise.toml task definition into .mise/tasks/release/pr, mirroring the existing task-file pattern and enabling variadic arg forwarding.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
mise.toml Removes the inline release:pr task definition in favor of a task file.
.mise/tasks/release/pr Adds a dedicated release:pr task script that forwards variadic args to release-plz release-pr.
.github/workflows/release-plz.yml Updates workflow steps to pass required --git-token / --forge github args to the mise release tasks.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/release-plz.yml Outdated
Comment thread .github/workflows/release-plz.yml Outdated
Comment thread .mise/tasks/release/pr
Define --git-token as a USAGE flag on release:create and release:pr
instead of forwarding via variadic [args]. Validates explicitly and
documents the contract; matches Copilot review feedback on #274.

Workflow now sets GITHUB_TOKEN in env once per step and passes
--git-token "$GITHUB_TOKEN" to mise, instead of duplicating
${{ secrets.GITHUB_TOKEN }} in both env and command.
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
@zeitlinger zeitlinger merged commit 4d13848 into main May 8, 2026
12 checks passed
@zeitlinger zeitlinger deleted the fix/release-plz-git-token branch May 8, 2026 13:57
@github-actions github-actions Bot mentioned this pull request May 8, 2026
zeitlinger added a commit that referenced this pull request May 8, 2026
## Summary

- Drop `#MISE depends=["release:update"]` from `.mise/tasks/release/pr`.

## Why

`release-plz release-pr` already runs `update` internally. Chaining
`release:update` as a `depends` made every CI run bump and regenerate
the changelog **twice**.

Visible symptom: release PR
[#242](#242) currently shows
`v0.23.0` with every PR since project start in the changelog. The first
successful release-plz run after
[#274](#274) merged actually
computed the right thing — the run log shows:

```
INFO determining next version for flint 0.21.0
INFO flint: next version is 0.22.0
* flint: 0.21.0 -> 0.22.0
```

…and then the chained second `update` (via `release-plz release-pr`'s
internal call) bumped 0.22.0 → 0.23.0 on top of an already-bumped tree,
regenerating the whole CHANGELOG.

`release:update` stays available for local manual previews.

## After merge

The next push to `main` should refresh #242 to `v0.22.0` with only
commits since `v0.21.0`.

## Test plan

- [ ] CI green on this PR
- [ ] After merge, release PR #242 retitles to `chore: release v0.22.0`
and changelog scope shrinks to commits since `v0.21.0`

Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants