Delete feature branches in Github in a way that they can be restored
I closed a PR to master, and Gearset deleted the feature branch. However, it wasn't merged, so I wanted to restore it to continue work. I was completely gone from Github. I believe Gearset should do a normal delete that allows restoration instead of completely obliterating feature branches or allow an option to do so.
-
Marco Pinder commented
Absolutely agree with this suggestion. Have just experienced a scenario where closing a PR that is mid-flight in the pipeline caused the promotion branch and underlying feature branch to be deleted. So far, so good in terms of expected behaviour due to my pipeline settings. However, after restoring the promotion branch in order to reopen the PR and promote it in the pipeline, the next environment on the pipeline did not then show the change. This, I believe, was because restoring the promotion branch DID NOT restore the feature branch. Therefore there was no source to create a new promotion branch and PR for the next environment in my pipeline. Feels like a missing feature whereby restoring a promotion branch should also restore the feature branch, especially if the restored promotion branch is mid-flight in the pipeline - which should be identifiable through naming convention of the restored promotion branch in relation to the pipeline. Will post this as a separate idea too.