-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
prepare pull request message hook #1179
Comments
@mislav - just a ping to see if this is an acceptable feature. I'd prefer to get buy-in from a contributor before investing time in a PR. |
@nyarly Sorry for the late reply! It's not a bad idea. How would the hook funcitonaly work exactly, i.e. when is it called, what are its input, and what would be its output? Thanks! |
Not to be too original:
I note that |
I would recommend that if a repo has a Optionally, maybe, a |
I think there is some confusion about how git hooks work. This wouldn't be something that gets added to the message instead of (or in addition to) the This would work the same way the default git So, assuming the current workflow was something like this:
The new workflow would just add hooks around that process. To make it work like the default git
It seems that hub already encapsulates the "build a message from a template and then launch your editor on it" logic in I may take a stab at a PR at some point, but I don't know go, so it probably wouldn't be any time soon.. |
Shortly after writing that last comment it occurred to me that this could be done right now, just by wrapping your editor in a command that can invoke hooks. So, if you don't want to wait for this to make it into hub... I thought about adding support for pull request templates, but there are so many different places they can be stored in the repo that it was too much work for a simple shell script.. |
By analogy to git's prepare-commit-message, it'd be great to be able to set up a prepare-pull-request-message as well. My specific use case is integrating with ticketing systems (e.g. Pivotal Tracker and Jira) which recognize ticket ids in commit and PR messages and automatically update the associated tickets. It's very handy to be able to have local configs and plug that information into the PR automatically.
(Respectfully, I see that the github PR templates were integrated into hub, and I'd've thought the .git/hooks approach would've been the right approach to that...)
The text was updated successfully, but these errors were encountered: