-
Suggestion
-
Resolution: Fixed
-
Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.
Lately, a bullet list of the commit messages has been added to the default description of a Pull Request.
This is great, but we'd love to have our own template, that might include some of this dynamic data, using some parameters like ${commits} or something.
We typically include multiple headings in all PRs for our team, and it would be nice to have that auto-populated.
[BCLOUD-11571] Pull request description templates
FYI for anyone looking for the equivalent request in Bitbucket Server: https://jira.atlassian.com/browse/BSERV-8663
Is this feature not supported in Bitbucket server version ? Please let me know how i can use this feature in Bitbucket server version.
At this time, no substitution is available. BCLOUD-17743 is the open feature request for variable substitution for the commit list, so please watch/vote on that issue as this closed issue is no longer being actively monitored. Thanks!
So…I have seen a lot of previous comments referencing predefined variables and whatnot, but does this feature actually support any custom variables at all? I have a request from a user to pre-populate the source & destination branch names, as well as the actual pull request number, but for the life of me, I have no idea how to actually do this here, and the various things I have tried do not seem to work (or at least the “Preview” link does not appear to respect any of them, just rendering them as straight text. Or is it just straight Markdown and it is up to us to fill in those variables?
Also possible that my user is not sure what they are asking for, and this field might be the wrong spot for that. shrug. Anyway, figured I’d ask.
@awbb is it possible to add a checkbox to default description? I've tried to follow github template convention with usage of []. Unfortunately it doesn't work for me (square parenthesis is printed instead of checkbox)
@awbb is there an option to create the PR template from code instead of through bitbucket's settings? I like to put comments into the PR template but when I'm creating a new PR they are gone.
@awbb do you have an ETA to resolve special caracters problem? Or there an issue to follow?
We can't use any accented characters right now.
Thanks.
Hi everyone,
Thank you for trying out this feature and providing your feedback! The character limit has been increased (2,000), and the issue with some characters throwing an error will be resolved soon.
Thanks for the additional context on how the commit list would be useful in your description templates. We will look at adding support for the commit list as a custom variable in a future iteration; I have opened issue BCLOUD-17743 to track that request.
We'll also look at making it easier to view extended commit messages in the PR UI.
Best,
Alastair
I agree with @BenTatham . It would be very useful to be able to add the list of commits messages dynamically inside the template.
Using the current list of commits is not very practical, especially when the quantity of commits is big and the descriptions are extensive.
Nice work getting started on this.
I'm seeing a [fairly short] character limit on that PR description text box at the moment which means I'm not yet likely to get much value from it yet.
Would love to be able to include some fairly decent length text in the template. This is particularly helpful when you have [ ] Checklist items in the PR template itself (done to help speed up the process of ensuring PR conformity).
@awbb : I also agree with @BenTatham. My use-case is not regarding the list of commits, but rather the integration with multi-line commit messages. Prior to activating the templates, I could use a commit message like the following:
Derezz the master control program
MCP turned out to be evil and had become intent on world domination.
This commit throws Tron's disc into MCP (causing its deresolution)
and turns it back into a chess game.
And it would use the first line (subject line) as the PR title and the message would automatically be inserted into the description. If I've already written a detailed commit message, I don't want to have to re-type it for the PR. @kabirahmed 's proposal would work for me.
@awbb : Agree with @BenTatham - for us scenario is
if do not use the default description list of all committs shows (like it used to )
if we use default description list of commits does not show
The desired would be have a some varibable as suggested ${COMMITS} which one can add into his/her default description's either end/start where the list is shown e.g.
-
- your default descripton template.
${commits}
OR
${commits}
-
- your default description
@reneleite Amazing. Another fine piece of work from Atlassian. :clap: :clap: :clap:
@awbb - we would also love to have the changelog list available in the description as @BenTatham mentioned. The use case is that it allows a jumping off point for describing changes, with as much copy-pasting, as the alternative.
@hanseldunlop You can't have a template that is too big and some characters break it
It just gives a server error when trying to save it. And it doesn't respect the mark up in the preview.
@loghinr / @imayorga / @mnzl - Very strange, sorry about that. We'll investigate!
@BenTatham - No plans for to add support for that right now, especially given that the list of commits is displayed right below the description in the new pull request UI (beta), and the commit list is usually used as a jumping-off point. Can you help me understand the use case?
Great, trying this out right now. Unfortunately anything but trivial markdown results in "Something went wrong".
The error code is: 553e41689a5345c58571cec87d978c67
@awbb I'm having issues with the length of the template. I just can add a couple of rows.
@awbb is there a way to include the list of commits (like the current default) within the template? $COMMITS or something? I would like to be able to keep that, and add to it/around it.
@awbb is there a limit on that new field? I'm seeing error if the message is more than a couple paragraphs.
Hi @benwgold, this change affects Bitbucket Cloud (bitbucket.org) only. The equivalent feature request for Bitbucket Server is BSERV-8663. Thanks!
@awbb this is great news! Is this change for both Bitbucket Server and Cloud, or just one of the two?
Hi everyone,
This feature is now available under the new “Default description” tab in repository settings. Give it a try, and let us know if there are any issues!
Thanks,
Alastair
Hi y'all,
Just a quick update to let you know that we are working on this, and it will be available soon.
The first implementation will be a repository setting to define the template. Depending on demand, we may add support for template files in the repository itself in the future.
Thanks for your patience!
Alastair
Bitbucket PM
In the meantime, you can use this Chrome Extension --> https://chrome.google.com/webstore/detail/git-pull-request-template/dlflgkjacacpmhdpiggkdiaieddfmkia
Please add this feature, this feature alone is making the transition from github to bitbucket really hard on my whole team
Please add this feature. +1
Do you have a rough idea when this will be implemented?
Thanks!
+1 This is one of the biggest things holding my team back from moving from github.
If it's not on the roadmap, please add it to roadmap and implement it, problem solved.
This doesn't mean we never plan on doing it, or that we don't think it's a useful idea. It's just not at the top of our priorities right now.
Subway Surfers Psiphon Hill Climb Racing
+1 Used this a lot on github. Would be very useful to have it on bitbucket as well.
+1