diff options
author | Pierre Sassoulas <pierre.sassoulas@gmail.com> | 2022-11-16 23:49:14 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-16 23:49:14 +0100 |
commit | 6331d957a8ffc39a10323273192210ffab9ff9db (patch) | |
tree | ed321def7477af2f1def5b1c3f3d64d5237c1e84 | |
parent | d46d61320569891abcbb0cfbc160c5495fbb877c (diff) | |
download | pylint-git-6331d957a8ffc39a10323273192210ffab9ff9db.tar.gz |
[release process] Add a github actions to backport fix automatically (#7776)
Based on https://github.com/tibdex/backport which seems awfully conveniant.
-rw-r--r-- | .github/workflows/backport.yml | 25 | ||||
-rw-r--r-- | doc/development_guide/contributor_guide/release.md | 15 |
2 files changed, 30 insertions, 10 deletions
diff --git a/.github/workflows/backport.yml b/.github/workflows/backport.yml new file mode 100644 index 000000000..6641ea8da --- /dev/null +++ b/.github/workflows/backport.yml @@ -0,0 +1,25 @@ +name: Backport +on: + pull_request_target: + types: + - closed + - labeled + +jobs: + backport: + name: Backport + runs-on: ubuntu-latest + # Only react to merged PRs for security reasons. + # See https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request_target. + if: > + github.event.pull_request.merged && ( + github.event.action == 'closed' + || ( + github.event.action == 'labeled' + && contains(github.event.label.name, 'backport') + ) + ) + steps: + - uses: tibdex/backport@v2 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} diff --git a/doc/development_guide/contributor_guide/release.md b/doc/development_guide/contributor_guide/release.md index ee5fa2b7a..5de4b248f 100644 --- a/doc/development_guide/contributor_guide/release.md +++ b/doc/development_guide/contributor_guide/release.md @@ -49,17 +49,12 @@ branch ## Back-porting a fix from `main` to the maintenance branch -Whenever a commit on `main` should be released in a patch release on the current -maintenance branch we cherry-pick the commit from `main`. - -- During the merge request on `main`, make sure that the changelog is for the patch - version `X.Y-1.Z'`. (For example: `v2.3.5`) -- After the PR is merged on `main` cherry-pick the commits on the - `release-branch-X.Y-1.Z'` branch created from `maintenance/X.Y-1.x` then cherry-pick - the commit from the `main` branch. (For example: `release-branch-2.3.5` from - `maintenance/2.3.x`) -- Remove the "need backport" label from cherry-picked issues +Whenever a PR on `main` should be released in a patch release on the current maintenance +branch: +- Label the PR with `backport maintenance/X.Y-1.x`. (For example + `backport maintenance/2.3.x`) +- Squash the PR before merging (alternatively rebase if there's a single commit) - Release a patch version ## Releasing a patch version |