feat: Enable issue edit to read body from stdin#619
feat: Enable issue edit to read body from stdin#619ankitpokhrel merged 3 commits intoankitpokhrel:mainfrom
Conversation
|
While working with this I noticed that setting content from stdin only works with pipes/FIFOs. Redirecting a files content to stdin using shell redirection With this removed, both of these work: |
|
Hi @erpel, apologies for the late response. I don't exactly remember the reason behind this check, TBH. Perhaps it was overlooked when working on the initial feature. I think we can update the method import "golang.org/x/crypto/ssh/terminal"
func StdinHasData() bool {
if terminal.IsTerminal(int(os.Stdin.Fd())) {
return false
}
return true
} |
|
Thanks for looking into this. |
ankitpokhrel
left a comment
There was a problem hiding this comment.
This works fine. Thank you!
When working with
jiraI found that setting the body from stdin is not supported inissue edit. It seemed easy to add.If you're interested in this feature that does not break anything (as far as I can tell) please feel free to accept this MR. I'm of course open to suggestions for anything that can be improved.