Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Is there a way to limit BB-based rebases to the author of the PR.

Pankaj2204 June 12, 2018

Is there is a to limit BB-based rebases to the author of the PR. Or at least to have such an option. The Rebase button is provided by the Bit-Booster plugin, correct? Is it possible to configure the plugin to implement this request?

 

Thanks,

Pankaj

2 answers

1 accepted

0 votes
Answer accepted
Caterina Curti
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 12, 2018

Hi @Pankaj2204,

 

In case you are using Bitbucket Server (hosted by your company), this is currently not possible. The rebase button is available to every user. It would be helpful if you could share more details on this request.

 

This feature has been added to Bitbucket Server starting from version 5.5 and is part of the core product. For reference (and more details), this is the public facing feature request:

https://jira.atlassian.com/browse/BSERV-2874

 

Cheers,

Caterina - Atlassian

Pankaj2204 June 13, 2018

Thanks Caterina

0 votes
Julius Davies [bit-booster.com]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 14, 2018

Hi @Pankaj2204 !

As @Caterina Curti mentions, Bitbucket provides a native rebase button from Bitbucket 5.5 or newer, and there is also the Bit-Booster rebase (works from Bitbucket 4.0 to 5.x latest).  The native rebase is available via the "..." button on the PR controls, whereas Bit-Booster is a bit of a show off and insists on creating an entire dedicated Rebase button!

Personally, I do not think it's a good idea to restrict the rebase button to the PR author.  Under the hood a rebase is just a specific type of history rewrite, similar to an amend or a squash.  The rebase button is a convenience. It makes this sequence of commands easier for the end-user by combining them into a single button on the PR screen:

git checkout myBranch
git pull --rebase
git push --force

But even if the button was disabled, the end user could still run those commands from their own computer.

If you block "history rewriting" to the PR's source branch via "branch permissions" you will notice the Bit-Booster Rebase button does become disabled in that case. Clicking on it brings up the following dialog:

"Cannot rebase branch branch. History rewriting is not permitted for this branch."

Or if you are using the native Bitbucket Rebase, the rebase fails with the following message:

"The rebase completed without conflicts, but updating 'branch' was canceled by a plugin.

Rewriting history is not allowed for branch refs/heads/branch. Check your branch permissions configuration with the project administrator."

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events