diff --git a/.github/workflows/backport.yml b/.github/workflows/backport.yml new file mode 100644 index 0000000000..c0d07fef80 --- /dev/null +++ b/.github/workflows/backport.yml @@ -0,0 +1,16 @@ +name: Backport +on: + pull_request: + types: + - closed + - labeled + +jobs: + backport: + runs-on: ubuntu-latest + name: Backport + steps: + - name: Backport + uses: tibdex/backport@v1 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} diff --git a/DEVELOPER_GUIDE.rst b/DEVELOPER_GUIDE.rst index 1b634241db..e9bb943fe7 100644 --- a/DEVELOPER_GUIDE.rst +++ b/DEVELOPER_GUIDE.rst @@ -381,3 +381,13 @@ Doctest >>>>>>> Python doctest library makes our document executable which keeps it up-to-date to source code. The doc generator aforementioned served as scaffolding and generated many docs in short time. Now the examples inside is changed to doctest gradually. For more details please read `Doctest <./dev/Doctest.md>`_. + + +Backports +>>>>>>>>> + +The Github workflow in `backport.yml <.github/workflows/backport.yml>`_ creates backport PRs automatically when the original PR +with an appropriate label `backport ` is merged to main with the backport workflow run successfully on the +PR. For example, if a PR on main needs to be backported to `1.x` branch, add a label `backport 1.x` to the PR and make sure the +backport workflow runs on the PR along with other checks. Once this PR is merged to main, the workflow will create a backport PR +to the `1.x` branch.