Otherwise, when an error occurs (e.g. credentials wrong on git push)
the worktree and the release branch still exists, which might be hard to
remove for a newcomer not knowing about `git worktree`.
This script provides functionality to easily backport a merged pull request to
a release branch.
It relies of having a `github` API token stored in `~/.riotgithubtoken` by
default.
The script works by fetching information from the supplied **merged** pull
request. It then looks for the last release branch.
A temporary git `worktree` with a new branch is created based on this release
branch. All commits from the pull request are then cherry-picked into this
branch which is then pushed to `origin`.
It then creates a new pull request on `github` with a reference to the original
pull request. It optionally puts a comment under the original pull request to
the new backport pull request.
Co-authored-by: Gaëtan Harter <gaetan.harter@fu-berlin.de>