Closed brandizzi closed 5 years ago
@brandizzi Well there are two ways you can accomplish that:
gh pr -s someuser -D "Your comment"
Description is technically a comment.
gh pr yourPrNumber -c "Your comment"
Does that achieve what you are trying to do?
Hello @protoEvangelion!
Well, we already use these alternatives. Yet, we find them less convenient than possible, for two reasons:
If I send a PR for that, would that get merged?
If I understand you correctly, you are trying to add a comment on PR submit correct?
If that is what you are trying to do, please send a PR and I would be happy to work with you on it to get it merged :)
After thinking this through again, I realized you can actually use a hook to add as many comments as you want after the PR has been submitted.
In your ~/.gh.json
file you can adjust the hook to run whatever cmd you want:
"pull-request": {
"submit": {
"before": [],
"after": [
"{{#if options.number}}gh pr {{options.number}} --user {{options.user}} --repo {{options.repo}} --comment 'Pull request submitted to {{submittedLink}}.{{#if options.changes}} [See changes here.]({{compareLink}}){{/if}}'{{/if}}",
"gh pr --browser {{options.browser}} --user {{options.submit}} --repo {{options.repo}} --number {{options.submittedPull}}",
"{{#if options.number}}gh pr --user {{options.user}} --repo {{options.repo}} {{options.number}} --close{{/if}}"
]
}
},
It would be nice to gh to be able to comment on a pull request it just submitted. Something like this:
This would be useful, for example, to communicate with CI:
Or to mention users: