Create script for creating backports

What does this MR do and why?

I noticed that we do not have a script to create backports for regular bugs but we do for the security fixes.

I've created a script to creating backports. Most of this logic is copied from bin/secpick with some additional improvements.

The script now uses tty-prompt to improve the UX. The script will:

  1. ask for confirmation if this is a security backport to prevent accidental security backports into the canonical repo.
  2. list all of the engineers git remotes and sort them so the security remote is first (as this is the least risky for us to push to)
  3. parses the VERSION file and uses this to build a list of the 3 previous versions for the engineer to pick from (can still supply --version=18.1 manually too)
  4. if the engineer is creating a security backport and doesn't have the security remote this will now ask and create it for them
  5. looks up the security remote using URLs instead of hardcoded security name
  6. specifies correct template for security and bugfix MRs
  7. prefixes bugfix backport branches with backport- and security backport branches with security-

Conditioning engineers to use the new script

I've added logic to the old bin/secpick script to inform engineers of this change with a helpful command they can copy and paste.

image

Using the new tool

image

NOTE: I'm not using a real branch here so it shows the MR ref selection page, however, modifying the URL to use master as the source shows that the correct template and branches are used

Screen_Recording_2025-06-25_at_14.00.00

When no security remote is configured

image

image image

When attempting to push a bug fix to security remote

image

When attempting to push a security fix to non-security remote

image

Edited by Joe Woodward

Merge request reports

Loading