New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multi line body with flags #595
Comments
Good question! One way that is immediately available to you is passing a multiline string as the gh issue create -t mytitle -b 'hello
multiline
body' If you have a multiline string in a shell variable, you could also simply pass it like so: I also like your suggestion of passing multiple Finally, I believe that in general, any command-line operation that accepts a blob of text should also accept it from standard input. There is usually some way of signalling that; in our case, we could accept |
Thanks for the quick answer.. Indeed, I use a library to launch the command that use a double-quoted to pass argument.. That's why it doesn't work. Thanks for the tips. |
Reading from stdin with Other options:
I think any solution should do what |
My current workaround is to write the message to a file and then do this: echo -e "line1\nline2\nline3\n" > msg
export msg=$(cat msg) ; gh create pr -b "$msg" |
The |
@msfjarvis I like the ability for |
The latest release of gh supports passing a |
In this PR: - Write PR description into a file which lives the same directory with the configuration. Context: After #2531, we can generate pull request description from generation config and a baseline commit. However, the return value (string) can not be retrieved when running in docker environment. Therefore, write the description to a file. Put multi-line description to a file also helps editing the pr body ([link](cli/cli#595 (comment))).
Describe the feature or problem you’d like to solve
I can't find a way to create a PR with a multi line body with the flags
Proposed solution
One solution can be to allow multiple time the flag
--body
and concatenate with the newline separator. It's useful when use the cli in a script or something like thatOr may be there is another way?
The text was updated successfully, but these errors were encountered: