Expand history rewrite blocking to Feature and Bugfix

Issue #165 resolved
Eric Pederson created an issue

After reading #69 I now understand why I could not block history rewriting for Feature or Bugfix branch types. We use a branching system similar to Git Flow with multiple major feature branches and multiple major release branches. We want to block history rewriting on those but not for our PR branches which are our topic branches where developers do work for Pull Requests. Those PR branches get merged into Feature or Release branches. We are using BugFix in the branching model for PR branches.

The Branching Model naming is:

  • Feature: feature-*
  • Release: release-*
  • Bugfix: task-* (aka PR branch)

We want to allow history rewriting for Bugfix branches but no others. We could assume that all branch names fall into the branching model but it would be better to have the ability to deny history rewrites on all branches (like the the Reject Force Push hook) except for a subset selected using the branching model.

We could potentially use HotFix for our feature branches and then let our PR branches fall into the uncategorized bucket. But we want to use other things like Always Require Pull Requests for the PR branches.

Comments (6)

  1. Julius Davies [bit-booster.com] repo owner

    Should we still do it? Pretty trivial enhancement on our side (under the hood this is fully supported, just need to expose it in the admin page).

    The only reason I left “Feature” and “Bugfix” off of the choices for these controls was I just felt the UI was already so complicated and overwhelming. But that ship sailed long ago - Control Freak is super complicated and only gets more complicated every release! :-p

  2. Eric Pederson reporter

    Hi Sylvie - it turns out that we can do what we need to do with the regular Bitbucket Branch Permissions feature. Our needs are pretty minimal.

    Thanks,

  3. Julius Davies [bit-booster.com] repo owner

    Implemented this for v2020.11.17. Sometimes it's nice to set this up in TWO places (Control Freak AND Bitbucket Native) to lock it down extra securely! ;-)

  4. Log in to comment