Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add --custom-script option #267

Open
v1v opened this issue Sep 3, 2021 · 2 comments
Open

Add --custom-script option #267

v1v opened this issue Sep 3, 2021 · 2 comments

Comments

@v1v
Copy link

v1v commented Sep 3, 2021

What

Add --custom-script option to honor to call a script that runs before creating the backported pull request. This particular option will allow to customise the backport process after the cherry-picking.

This option will need to the follow:

  1. Run the given script
  2. Commit any new changes.

Then the backport process should proceed as usual.

Why

My use case is to allow developers to run backport locally and enable certain level of customisation for those backports.

A real use case:

  1. ACME project will have a major release
  2. The major release will have the major update version in the import paths.
  3. While backporting to the previous releases will require to downgrade those import paths, and this when the --custom-script could help.
@sorenlouv
Copy link
Owner

sorenlouv commented Sep 3, 2021

That sounds doable!

Commit any new changes.

What should the commit message for the new changes be?

If multiple commits were selected for backporting should the script run after each of them are cherry-picked or once when all are?

@v1v
Copy link
Author

v1v commented Sep 7, 2021

What should the commit message for the new changes be?

Good question, I'm tempted to say generated by the custom-script <name-of-the-script> , f.i:

backport .... --custom-script downgrade-imports.sh

could generate the commit message generated by the custom-script 'downgrade-imports.sh'

What do you think?

If multiple commits were selected for backporting should the script run after each of them are cherry picket or once when all are?

I'd say the latter, so if needed it could be added a new flag --custom-script-per-cherry-pick or something similar to support one script call per cherry-pick .

WDYT?

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

No branches or pull requests

2 participants