Pull request description templates

Issue #11571 resolved
Ben Tatham
created an issue

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.

Comments (145)

  1. Zachary Davis

    This is not currently on the roadmap, and as far as I know there isn't any current plan to add this functionality. 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.

  2. Marie Fetiveau

    Also interested by this feature. Our PR template is static, right now we are copying / pasting it from Confluence, but could be really helpful if it is already here in the description when we create the PR.

  3. WeiningMa

    We'd love to have this feature also. We are using a static PR template right now and every time people need to copy/paste.

    BTW: @Peter Ramsing, we have also tried the Chrome extension but it doesn't work though. Creating commit first then do PR but there is no template added into the PR... Any idea?

  4. Sravan Manne

    +1 We are looking forward for this feature as well.
    -To be able to define sort of a "Description Template" for the developers to provide some mandatory details while raising a PR.

  5. bartread

    +1 for this feature. -1 for the yak-shaving I had to go through to add a comment to it.

    Seriously, it's been incredibly useful with GitHub. I have, however, a client who uses on premise BitBucket and for whom GitHub isn't really an option (in theory they could migrate to on premise GitHub Enterprise, but it's kind of a pain in the neck). This feature would be incredibly useful for them as well.

    I've previously worked on teams where you can use it to include, for example, a checklist of actions to be completed/considered before submitting a PR, which can help make the code review and approval process run smoother.

  6. Manuel Gómez

    Ok, unsusbscribing after months of daily "+1"s and no f's given by BitBucket team.

    For this and other issues, my organization is moving to git and will use a more mature and user aware solution, as GitHub, Gitlab or whatever, anything will be better than this.

    Good luck!

  7. Chris Werding

    What I am wondering is why nobody (no staff) is managing this proactively? And it's not like we would be talking about some super scary special feature? This, along with BB-14755 is just so obviously useful that I am really wondering what's the issue here? Feature parity with Github would be SO important, dear Atlassian!

    Reminds me of Hipchat, a couple of years ago. Hipchat was ok, the integration with Jira was good, the client really bad (in it's early days). And instead of any progress, it just sat there and nothing happened. And then came Slack. And that was it, basically, for Hipchat.

    So dear Atlassian, how can we help? We would love to, really. Otherwise, we wouldn't be posting on your support forums all day long, right? :-)

    Best,
    .chris

  8. Val Redchenko

    I will use this when building an argument for my bosses of why we are ditching Bitbucket and taking our business to GitHub or set up a GitLab on AWS.

    A PR template is crucially important for forming good git habits amongst less experienced developers and is a feature that's easy to implement

  9. André Tito Vasconcelos

    You sir, are a lifesaver. The extension worked like a charm!

    For anyone else facing this issue, i highly recommend using this (make sure to activate features you need in Chrome://extensions after installing it from the store)

  10. Ronald Rey

    @André Tito Vasconcelos Thank you for pointing that out! I forgot to mention it and definitely some users miss that.

    Here's a GIF on the feature working, just to catch the attention of anyone skimming through this issue that might not have caught my previous message. In it I'm using the template hosted on https://gist.githubusercontent.com/anonymous/8054a3ee32f7cf1a5975e3fd52b3c5f3/raw/f6897720e8b6b93becd246187dac36038291c3a4/PULL_REQUEST_TEMPLATE.md, but it can also be part of the actual Bitbucket repository. The details of how it works is in the README of the extension here.

    pullrequest-template

  11. Paresh Mayani

    +100000000000000000 Come on Atlassian and Bitbucket team, listen to your customers what they are expecting and what other products Github/Gitlab are providing with which Bitbucket is lacking! Can you even believe it would take more than 3 years to implement this small set of functionality? Do you think it makes sense to keep 1000 of users in waiting list!

  12. Jarred Colli staff

    Hi Everyone,

    Thanks for your feedback on the issue of pull-request templates. Sorry to disappoint the many participants in this thread, but this specific project isn't on the roadmap yet. However, our team is spending a lot of time and energy on improving other aspects of pull requests, code search, and deployments.

    I will circle back on this again sometime soon.

    Sincerely,
    Jarred

  13. Anonymous

    @Jarred Colli so many users/teams that want this feature and github already has it - don't you think product people in Atlassian should reconsider ? roadmaps can change, I'm sure you guys are agile and are concerned about what's best for your customers!

    Cheers!

    P.S.
    Non- of the mentioned plugins is a good enough solution

  14. Jarred Colli staff

    Hey Nir! Its really a question of what work is already in progress that blocks other changes. Thanks for sharing that about the plugin, I'll allow others to make up their mind as to whether or not it works for them.

  15. Anonymous

    @Ronald Verhaegen Rey don't get me wrong - your plugin is cool, but for my needs it's not enough - I need APIs that I can integrate with so I'll be able to modify templates dynamically.

  16. Ronald Rey

    @nalfasi No offense taken, just wondering how it could be improved. I'm not sure what your needs are but it could probably be done through the plugin, I've just never had the feedback/request for it.

    As it stands now, for the rest of the people who don't need dynamic data in the template I believe it's a valid temporary solution.

  17. Alastair Wilkes staff

    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

  18. Alastair Wilkes staff

    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

  19. Kabir Ahmed

    @Alastair Wilkes : Agree with @Ben Tatham - 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

  20. Alan Evanson

    @Alastair Wilkes : I also agree with @Ben Tatham. 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. @kabir ahmed 's proposal would work for me.

  21. Dan Miller

    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).

  22. Julián Volpi

    I agree with @Ben Tatham . 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.

  23. Alastair Wilkes staff

    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 #17743 to track that request.

    We'll also look at making it easier to view extended commit messages in the PR UI.

    Best,
    Alastair

  24. Log in to comment