fix(pr): use stdin body when --body=- is passed#729
Merged
aviator-app[bot] merged 1 commit intoaviator-co:masterfrom Apr 23, 2026
Merged
fix(pr): use stdin body when --body=- is passed#729aviator-app[bot] merged 1 commit intoaviator-co:masterfrom
aviator-app[bot] merged 1 commit intoaviator-co:masterfrom
Conversation
The body variable was captured before the stdin read, so when --body=- was passed, the literal '-' was sent to the PR instead of the stdin contents.
Contributor
Current Aviator status
This PR was merged using Aviator.
See the real-time status of this PR on the
Aviator webapp.
Use the Aviator Chrome Extension
to see the status of your PR within GitHub.
|
Contributor
✅ FlexReview StatusCommon Owner:
Review SLO: |
There was a problem hiding this comment.
Code Review
This pull request fixes a logic error in cmd/av/pr.go where the pull request body variable was assigned before handling the case where the body is read from standard input. Additionally, it corrects a typo in a code comment. I have no feedback to provide.
simsinght
approved these changes
Apr 23, 2026
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.
The
bodylocal was captured fromprFlags.Bodybefore the stdin read, so when--body=-was passed, the stdin contents were written intoprFlags.Bodybut the subsequent call toactions.CreatePullRequeststill used the stalebodylocal (= the literal"-"). As a result the PR body ended up as-.Fix: move the
body := prFlags.Bodycapture to after the stdin read.Reproduce (before fix)
After fix