From c27e55cabe6546177fdb80676d537c769d7ded22 Mon Sep 17 00:00:00 2001 From: David Cui Date: Wed, 23 Feb 2022 10:52:25 -0800 Subject: [PATCH] add auto backporting for sql Signed-off-by: David Cui --- .github/workflows/backport.yml | 16 ++++++++++++++++ DEVELOPER_GUIDE.rst | 10 ++++++++++ 2 files changed, 26 insertions(+) create mode 100644 .github/workflows/backport.yml 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.