PHPC-2375: Manually merge up version bump commits #1586
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PHPC-2375
This PR adds logic to automatically merge up changes to the next release branch. This is necessary as the pull request for the merge-up action will always have a conflict due to the version already having changed in the next branch.
If the branch detection logic finds a newer branch to merge to (which it always should as we're releasing from version branches), it runs a
git merge --strategy=ours
in this next branch, then pushes those changes before pushing the release branch. By pushing the next branch before the release branch, the merge-up action discovers that there are no commits to be merged from the release branch into the next branch and will not create a merge-up pull request.Note that if the release branch contains changes that have not been merged up yet, those changes will be marked as merged without applying them. I can add logic to detect this and prevent a release, but this case shouldn't come up very often as we're quite diligent about merging the merge-up pull requests so I've decided against it for the time being.