From a9be564abcc8f146873b0782d9cd85ad86ba023c Mon Sep 17 00:00:00 2001 From: Brian Dukes Date: Wed, 21 Jul 2021 10:45:09 -0500 Subject: [PATCH 1/2] Add workflow to auto-open PRs to v10 branch --- .../workflows/open-merged-pr-to-future.yml | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/open-merged-pr-to-future.yml diff --git a/.github/workflows/open-merged-pr-to-future.yml b/.github/workflows/open-merged-pr-to-future.yml new file mode 100644 index 00000000000..a9391857a3c --- /dev/null +++ b/.github/workflows/open-merged-pr-to-future.yml @@ -0,0 +1,32 @@ +name: Open Merged PR to release/10.0.0 Branch + +on: + pull_request: + types: [closed] + branches: + - develop + +jobs: + open-merged-pr-to-ten-branch: + runs-on: ubuntu-latest + if: ${{ github.event.pull_request.merged }} + steps: + - uses: actions/checkout@v2.3.4 + + - uses: peterjgrainger/action-create-branch@v2.0.1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + branch: v10/${{ github.event.pull_request.head.ref }}-${{ github.event.pull_request.head.merge_commit_sha }} + + - name: Create Pull Request + uses: repo-sync/pull-request@v2.6 + with: + source_branch: v10/${{ github.event.pull_request.head.ref }}-${{ github.event.pull_request.head.merge_commit_sha }} + destination_branch: release/10.0.0 + pr_title: v10 ${{ github.event.pull_request.title }} + pr_body: | + Applying #${{ github.event.pull_request.number }} to release/10.0.0 + ${{ github.event.pull_request.body }} + pr_label: ${{ join(github.event.pull_request.labels.*.name) }} + github_token: ${{ secrets.GITHUB_TOKEN }} From af9b7385809d2e5aebdafa5b63cde0d2713711a3 Mon Sep 17 00:00:00 2001 From: Brian Dukes Date: Wed, 1 Dec 2021 08:45:14 -0600 Subject: [PATCH 2/2] Use SHA instead of Merge Commit SHA for workflow See #4926 --- .github/workflows/open-merged-pr-to-future.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/open-merged-pr-to-future.yml b/.github/workflows/open-merged-pr-to-future.yml index a9391857a3c..8270df63d98 100644 --- a/.github/workflows/open-merged-pr-to-future.yml +++ b/.github/workflows/open-merged-pr-to-future.yml @@ -7,7 +7,7 @@ on: - develop jobs: - open-merged-pr-to-ten-branch: + open-merged-pr-to-release-branch: runs-on: ubuntu-latest if: ${{ github.event.pull_request.merged }} steps: @@ -17,12 +17,12 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - branch: v10/${{ github.event.pull_request.head.ref }}-${{ github.event.pull_request.head.merge_commit_sha }} + branch: v10/${{ github.event.pull_request.head.ref }}-${{ github.event.pull_request.head.sha }} - name: Create Pull Request uses: repo-sync/pull-request@v2.6 with: - source_branch: v10/${{ github.event.pull_request.head.ref }}-${{ github.event.pull_request.head.merge_commit_sha }} + source_branch: v10/${{ github.event.pull_request.head.ref }}-${{ github.event.pull_request.head.sha }} destination_branch: release/10.0.0 pr_title: v10 ${{ github.event.pull_request.title }} pr_body: |