Skip to content

Conversation

@andremig-bentley
Copy link
Contributor

This PR adds the ability to accommodate automatically backporting to a previous minor branch as well as the current minor and previous major. This is accomplished by adding the previous minor branch to the backport rule in mergify.yml as well as updating the logic in version-bump.yaml to update the branch names on version bumps.

The branch names have been moved to being held in variables at the top of the mergify.yaml file to accommodate major version bumps. In that case, the previous minor variable can be updated to null as stated in the instructions for a major version bump in version-bump.yaml. Note that as a pure yaml file, mergify.yml must use anchors and aliases to define variables as simpler variable definitions are not supported in pure yaml (as they are in azure devops pipeline definition yaml files for example).

The branch name update logic has also been moved within version-bump.yaml to be completed as soon as a new release branch is created, and it will immediately be pushed to master. Note that there is also continueOnError: true on this step so that a failure in updating the mergify branch names does not interfere with completing the more important version bump.

@hl662 hl662 requested a review from Copilot December 18, 2025 21:27
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces automated backporting to three branches (current minor, previous minor, and previous major) for security fixes, replacing the previous two-branch approach. The implementation uses YAML anchors/aliases for branch version management and adds automated branch variable updates during version bumps.

Key Changes:

  • Added previous_minor branch variable to security fix backport targets
  • Automated mergify.yml branch variable updates in version-bump.yaml pipeline
  • Moved branch variable updates to execute immediately after release branch creation

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
common/config/azure-pipelines/jobs/version-bump.yaml Added automated mergify.yml update step after release branch creation; removed manual minor release update logic; updated job dependency conditions
.github/mergify.yml Introduced YAML anchor/alias variables for branch names; added previous_minor branch to backport targets

Copy link
Contributor

@hl662 hl662 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should manually edit mergify.yml branch names one more time before we use version bump pipeline on 5.7 next month

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants