fix(statewrite): stamp the bot on orchestrate, release, and rollback state writes - #366
Merged
Merged
Conversation
…e bot The orchestrate and release finalize steps write trunk state through the Contents REST API by emitting a gh api PUT, and the rollback finalize CLI builds the same PUT by hand. None of these set author or committer, so the API attributed the commit to the token owner instead of the automation bot. Stamp author and committer from the manifest git identity (defaulting to github-actions[bot]) on all three paths, reusing the statewrite.Identity plumbing. Signed-off-by: Joshua Temple <joshua.temple@stablekernel.com>
Contributor
|
No workflow drift detected. |
joshua-temple
enabled auto-merge (squash)
June 26, 2026 02:41
Signed-off-by: Joshua Temple <joshua.temple@stablekernel.com>
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.
Problem
#364 made the Contents-API state writer stamp github-actions[bot], but only the promote and hotfix finalize callers used it. The orchestrate state write, release latest_release write, and rollback finalize build the
gh api ... PUTthemselves and set no author/committer, so GitHub attributed those automated commits to the token owner (the maintainer). Confirmed on a post-#364 run.Fix
internal/generate/state_write.gowriteStateCommitPushnow emitsauthor[name]/[email]andcommitter[name]/[email]; callers in generator.go and release.go passGetGitUserName/GetGitUserEmail(default github-actions[bot], manifest-overridable).internal/rollbackextracts a testablebuildStatePutArgsthat stamps the identity viastatewrite.Identity.OrDefault, threaded from manifest config through a newRollbacker.GitIdentity().statewrite.Identity.OrDefaultfor reuse. Orchestrate's local-git path already set the bot identity and is unchanged.Tests
New unit tests assert the bot author/committer on the orchestrate, release, and rollback paths, plus custom-identity honoring. Full
go test ./...1939 pass; vet and golangci-lint clean.Coupled suite change
cascade-example-3env
assert_auto_commitexpects the token-user login; it is updated in lockstep (separate suite PR) to expect github-actions[bot].