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
Add configuration option for commit msg format #52
Comments
The message must include "close GH-" to auto close the PR. But other than that, cool! |
Isn't there an API method to close it? Since jQuery landings usually don't contain that. Neither does GitHub's own "Merge" button use that (although GitHub's own button doesn't mean anything since it could just close the pr internally) |
Using the github auto close does a bunch of nifty things that the API alone does not, like automated linking of commit to PR. Otherwise, we have to make 2 API calls to simulate (but not exactly match) the same thing, which wastes time and causes a bunch of unneeded code. How about "landing pull request closes GH-###"? |
Sure, anything is possible. The user can configure whatever format he/she wants, this is merely requesting the ability to modify it from the config. The default can stay the same if you want. |
Github does also close PR or Issues when using "closes #XXX" or "closed #XXX" inside the commit message. The "GH-" prefix is not necessary. |
@Krinkle, the msg MUST at least contain |
I think @sindresorhus made a good point in #47 (although he later agreed to change it to Again, what the default is or what projects with external issue trackers use (like jQuery core), is something else. |
Mike made a good point about it fudding with a lot of external bug trackers. If we added a template, I still stand by initial thought of catering primarily for users of the GitHub issue tracker, with others having the option to override. What about giving the user the pull request id, title and bugs and let them do whatever they want with it? This being the default: Which would output:
jQuery could override with this template:
Thoughts? |
@sindresorhus Just now on IRC @mikesherov and I were basically coming to the same conclusion. See also #23 and this StackOverflow thread. We'll have to add a little bit of detection to see if the custom message is still going to make github auto-close it, and if not, do an Api call to close it afterwards. |
Can use some of the regex from @mikesherov in #31:
|
Right now it is hardcoded on line 221:
jQuery projects usually prefer the format of "
Landed pull request #{id}: {title}
". Maybe add a config option for this with a a $1 and $2 as placeholder forid
andpull.title
.The text was updated successfully, but these errors were encountered: