ci: read the commit message from env in the publish workflow - #3041
Open
kobihikri wants to merge 1 commit into
Open
ci: read the commit message from env in the publish workflow#3041kobihikri wants to merge 1 commit into
kobihikri wants to merge 1 commit into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe publish workflow’s ChangesPublish workflow
Estimated code review effort: 1 (Trivial) | ~5 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Hi, and thanks for SubQuery.
In
.github/workflows/publish.yml, theget_commit_messagestep reads the commit message by interpolation, in two places:Actions expands
${{ ... }}into the script text before bash runs, so the message becomes part of the command rather than a value. A commit message is free text that arrives with whatever a contributor wrote in the PR that got merged, and$(...)and backticks still run inside double quotes.This is the publish workflow — it has
id-token: writefor OIDC — which is why I thought it worth raising rather than leaving alone. It ison: pushtomain, so a message only reaches here after someone merged it; this is not open to a drive-by, and I would rather say that than imply otherwise.The change reads the message from the environment:
I switched
echoforprintfin that line so a message starting with something like-nis not read as a flag. Thehead -n 1truncation, thegit logfallback branch and the step output name are all unchanged, socommit-messagecomes out the same.Disclosure: I used AI assistance to help spot this and prepare the change, and I read the workflow and its trigger myself.
Summary by CodeRabbit