sapling
sapling copied to clipboard
Ability to specify explanations when amending a commit
Right now, amended commits show up on GitHub as force pushes with the same commit name, and on ReviewStack as numbered versions, but it would be nice to include short messages with amends explaining what they did (like "fix lint", etc). Ideally, these could be translated into PR comments on GitHub that are posted after the force-push.
I did see sl pr submit -m "..." but this seemed to not have any effect.
translated into PR comments on GitHub that are posted after the force-push
I think that is the intention of the sl pr submit --message "..." option you found, but it just isn't implemented yet.
Are you interested in implementing this? It looks like we need to add a graphql query for adding an "issue" comment (as opposed to a review comment), and then pipe the "message" down and add it as a comment to the PR(s).
Alternatively, it would be really handy if it turned the message into a git commit along the PR branch to avoid force pushing altogether. For folks using Github pull requests, force pushing often clobbers review comments and generally annoys reviewers.
I noticed this unimplemented CLASSIC option which is (maybe?) supposed to do this: https://github.com/facebook/sapling/blob/5d260bd2bb64208f27aadb020e0e17de261b4437/eden/scm/edenscm/ext/github/submit.py#L41-L49
Beyond PRs, it would be super nice to see the amend context in sl journal.