Is it possible to prompt the user during the creation of a Pull Request?

Our current workflow involves using Pull Requests for Code Reviews of commits that are going in to our main line.  The expectation is that the developer has compiled and tested the code locally before creating a Pull Request.  I would like to make this expectation explicit by adding a small checkbox to the Pull Request creation page, asking the user to confirm that they have completed testing.  Is this possible with a plugin or some other way?

3 answers

1 accepted

1 vote
Answer accepted
Adam Ahmed Atlassian Team May 12, 2016

You can plug into that page with a <form-fragment> plugin. This kind of plugin is something we thought we could improve on, so we never actually documented it, but it's there and I don't really see us getting rid of it anytime soon. Given the location isn't documented though, I can't promise we wouldn't remove that plugin location in a minor release.

The location you'd hook into is "", and you can trace back the <form-fragment> element in to see an example of how FormFragments can be used (note the context available will be different for the createPullRequest location than what the auto-unapprove plugin is using). essentially you are pretending that you are adding fields to the form to be submitted along with the form and handled by your plugin. But actually, you could just render whatever notice you want, and ignore any input validation / handling.

There's no more straightforward plugin point on that page, unfortunately.



I don't know any add-on that will do that.

I, however found that it's more effective to educate your users on what needs to be done beforehand.

I agree with Gabrielle... checkboxes that you must check, just become an, err, box-checking exercise... they become part of muscle memory so soon have no value at all.

Another way of accomplishing something similar is auto-adding a task to the PR - . Then you have a merge check that prevents merge if there are uncompleted tasks.

But that's interesting about form fragments... sounds useful.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Mar 14, 2019 in Bitbucket Pipelines

Building a Bitbucket Pipe as a casual coder :  #!/bin/bash source "$(dirname "$0")/" enable_debug extra_args="" if [[ "${DEBUG}" == "true" ]]; then extra_args="--verbose" fi # mandatory variables R...

265 views 0 12
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you