lifecycle icon indicating copy to clipboard operation
lifecycle copied to clipboard

Auto-merge release branches into main

Open yaelharel opened this issue 5 years ago • 7 comments

Now, after we moved the release process to Github Actions (see #415), we would like to add a Github Actions workflow for auto-merging release branches into main ~~after the releases are published~~ on every commit to the release branch.

yaelharel avatar Oct 06 '20 14:10 yaelharel

See https://github.com/buildpacks/pack/pull/645 and https://github.com/buildpacks/pack/blob/main/.github/workflows/release-merge.yml for reference on how pack is doing that.

yaelharel avatar Oct 06 '20 14:10 yaelharel

Do we want to do this when the release is published or on new pushes to the release branch?

natalieparellano avatar Oct 06 '20 16:10 natalieparellano

@natalieparellano, it is an interesting question! I thought about doing it once the release is published since, at that point, we'll be sure that everything works as expected, but there are also advantages of doing so on every commit to the release branch. Maybe the answer relates to a different question - when are we planning to create the release branch. If we plan to do so at the beginning of the development for this release, then it might take time to publish it and then it's probably better to run the merge on every commit so main will be up to date. But if we plan to create the release branch close to cutting the release, then I think it's better to auto merge only after publishing the release from the reason I wrote above and because the branch won't exist for a long time. What do you think?

yaelharel avatar Oct 07 '20 15:10 yaelharel

Pack does this whenever there is a new push to the release branch. It helps make sure that the two branches (main and release) don't end up out of sync, so it doesn't hold off on development that isn't making it into this release.

dfreilich avatar Oct 12 '20 08:10 dfreilich

@dfreilich, thanks for your input! Can you please share when do we create a release branch for pack, and for how long does it usually exist?

yaelharel avatar Oct 13 '20 15:10 yaelharel

Typically a release branch exists for 5 business days. The process is detailed here. Ideally releases should only happen every 6 weeks, with our cadence, but with hotfixes (etc), they tend to happen a bit more frequently... 😅

dfreilich avatar Oct 13 '20 15:10 dfreilich

@dfreilich, thanks again! So @natalieparellano, back to your question - assuming that we'll work similar to pack, and assuming that there won't be too many commits to the release branch, I guess we can run the auto-merge on every commit. I'll change the description of this issue. Thanks!

yaelharel avatar Oct 13 '20 16:10 yaelharel