backport-action
backport-action copied to clipboard
Improve manual instructions
We should be able to simplify the manual instructions that are commented when the action is unable to backport the pull request (e.g. due to conflicts).
- make sure the relevant commits are available locally by adding a fetch of the pull request
git fetch origin refs/pull/<number>/head
- no need to determine the common ancestor anymore,
instead just use a shorthand for
^<base>
and<head>
(i.e.<base>..<head>
):git cherry-pick -x <base>..<head>
Although this improvement would be useful, I want to take a slightly different route when working on this myself.
Instead of directly replacing the instructions (which I'm happy to receive a PR for by the way), I want to enable users to define their own manual instructions by making them configurable as an input. This input should behave the same as other inputs where placeholders can be used like pull_description
and pull_title
.
To build these instructions, we'll need new placeholders for the baseref
, headref
, and branchname
.