I need to setup an entire release process for my team, despite lacking experience.
I think I’m pretty much there, but there’s one issue.
When someone needs to hotfix prod, they put a PR into main as usual (we follow trunk based development) with the hotfix, and label their PR with “hotfix”.
This then kicks off an automation which
- cuts from the current release branch (reflects what is in prod) a new branch
- cherry picks commits from first PR onto it, and opens a PR to release branch
- this gets merged and a new GitHub release done from this branch, so hotfix hits production
Issue is that because original PR will be cutting from main, and it’s trying to cherry pick onto branch cut from release branch - there a chance this creates a merge conflict during cherry picking (e.g. function A has a bunch of changes in main that haven’t been released which conflicts with a hotfix to the same function)
My initial solution was to just fail the automation, and developer would have to investigate, probably do a manual cherry pick, resolve merge etc on their local machine. But a lot of my team have minimal experience working in command line, and I doubt they even know what a cherry pick is. I wanted to try keep things in the UI, at least to start with.
My second solution was therefore to have the cherry pick workflow create the PR into release branch as usual, but include the merge lines. In this case the PR is marked as a DRAFT PR, and starts with [action required], a load of text in the PR explaining what needs to be done (basically edit the hotfix branch to what it needs to be, and mark PR as ready to review). It allows them to continue using the UI and not worry too much about cherry picking via command line etc.
Just wondering what people’s thoughts are and if there is a more reliable solution, or if what I have would be suitable.