]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
ceph-backport.sh: implement interactive setup routine and new options
authorNathan Cutler <ncutler@suse.com>
Thu, 24 Oct 2019 11:26:50 +0000 (13:26 +0200)
committerNathan Cutler <ncutler@suse.com>
Mon, 4 Nov 2019 18:33:40 +0000 (19:33 +0100)
commitc250cf2589e5f996046ef2d67a54ce74fc52845f
tree48079edfcbcc97277ad0d523084c5d55ffc76680
parentbe6b09feb267754e643229860f7ea5672d8d897d
ceph-backport.sh: implement interactive setup routine and new options

This commit implements several new features:

* a --cherry-pick-only option
* a --force option
* an --existing-pr option
* an interactive setup routine

The --cherry-pick-only option can be used to test whether a backport
cherry-picks cleanly, for example. This is the same as the --prepare
functionality that was provided by an earlier version of the script, and
--prepare is re-introduced as a synonym for --cherry-pick-only.

The --force option can be used to make the script less careful (less
"cowardly"). For example, if the script refuses to do a backport because the
backport tracker issue is assigned to someone else, the script will "cowardly"
refuse to continue. Use --force to override. Be aware that --force will also
blow away an existing wip branch - the script asks for user confirmation in this
case.

The new --existing-pr option can be used to specify the number (ID) of an
existing backport PR that addresses the backport tracker issue given via the
positional argument.

The new "interactive setup routine" should make the setup process much simpler
for the user. If there is a setup issue, the script produces a report and starts
the interactive setup routine, which prompts the user for the needed
information.

Also, the script no longer requires the user to explicitly provide values for
github_user and redmine_user_id. Instead, it divines the correct values from the
GitHub token and the Redmine key, respectively.

Finally, the existing ~/bin/backport_common.sh file is deprecated in favor of
two files:

    ~/.github_token
    ~/.redmine_key

(The latter is already used by Sage's build-integration-branch tool and it
didn't make sense to have two different configuration files for a single
purpose.)

Signed-off-by: Nathan Cutler <ncutler@suse.com>
src/script/ceph-backport.sh