From d6655b3673cc2c71b1021113adb7da07b67be43f Mon Sep 17 00:00:00 2001 From: noahdietz Date: Wed, 13 Jul 2022 15:37:50 -0700 Subject: [PATCH 1/5] chore(ci): add sync branch workflow for storage-refactor --- .github/workflows/sync_branch.yaml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/sync_branch.yaml diff --git a/.github/workflows/sync_branch.yaml b/.github/workflows/sync_branch.yaml new file mode 100644 index 00000000000..9ff4dbbeea4 --- /dev/null +++ b/.github/workflows/sync_branch.yaml @@ -0,0 +1,26 @@ +name: Sync storage-refactor +on: + schedule: + - cron: 0 23 * * * # Daily at 23:00 UTC / 16:00 PST + workflow_dispatch: {} # Allow manual triggering + +jobs: + sync-branches: + runs-on: ubuntu-latest + name: Syncing branches + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Set up Node + uses: actions/setup-node@v3 + with: + node-version: 16 + - name: Opening pull request + id: pull + uses: tretuna/sync-branches@1.4.0 + with: + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} + FROM_BRANCH: "main" + TO_BRANCH: "storage-refactor" + PULL_REQUEST_TITLE: "chore: sync main to storage-refactor" + REVIEWERS: '["noahdietz"]' \ No newline at end of file From 9c7d0410b9bbb710ca3251a60288e0af9ac3cc27 Mon Sep 17 00:00:00 2001 From: noahdietz Date: Wed, 13 Jul 2022 15:47:10 -0700 Subject: [PATCH 2/5] add change notes --- .github/workflows/sync_branch.yaml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/sync_branch.yaml b/.github/workflows/sync_branch.yaml index 9ff4dbbeea4..a7764b29f74 100644 --- a/.github/workflows/sync_branch.yaml +++ b/.github/workflows/sync_branch.yaml @@ -10,17 +10,22 @@ jobs: name: Syncing branches steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Set up Node uses: actions/setup-node@v3 with: node-version: 16 + - name: Get change notes + id: changes + run: echo ::set-output name=change_notes::$(git log storage-refactor..main --oneline --pretty=format:%s) - name: Opening pull request id: pull + # https://github.com/marketplace/actions/sync-branches uses: tretuna/sync-branches@1.4.0 with: GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} FROM_BRANCH: "main" TO_BRANCH: "storage-refactor" + REVIEWERS: '["noahdietz"]' PULL_REQUEST_TITLE: "chore: sync main to storage-refactor" - REVIEWERS: '["noahdietz"]' \ No newline at end of file + PULL_REQUEST_BODY: "${{ steps.changes.outputs.change_notes }}" \ No newline at end of file From 34b7d0224bdf849d5b60f1478fd6bbc0022c858a Mon Sep 17 00:00:00 2001 From: noahdietz Date: Wed, 13 Jul 2022 15:50:33 -0700 Subject: [PATCH 3/5] only on weekdays --- .github/workflows/sync_branch.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sync_branch.yaml b/.github/workflows/sync_branch.yaml index a7764b29f74..1f8b01420ac 100644 --- a/.github/workflows/sync_branch.yaml +++ b/.github/workflows/sync_branch.yaml @@ -1,7 +1,7 @@ name: Sync storage-refactor on: schedule: - - cron: 0 23 * * * # Daily at 23:00 UTC / 16:00 PST + - cron: 0 23 * * 1-5 # Week-daily at 23:00 UTC / 16:00 PST workflow_dispatch: {} # Allow manual triggering jobs: From 3bb23b582cf65f713f876914c7818923ce83638f Mon Sep 17 00:00:00 2001 From: noahdietz Date: Wed, 13 Jul 2022 15:52:15 -0700 Subject: [PATCH 4/5] change job names --- .github/workflows/sync_branch.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/sync_branch.yaml b/.github/workflows/sync_branch.yaml index 1f8b01420ac..ca03afa29f5 100644 --- a/.github/workflows/sync_branch.yaml +++ b/.github/workflows/sync_branch.yaml @@ -5,9 +5,9 @@ on: workflow_dispatch: {} # Allow manual triggering jobs: - sync-branches: + sync-storage-refactor: runs-on: ubuntu-latest - name: Syncing branches + name: Syncing storage-refactor steps: - name: Checkout uses: actions/checkout@v3 @@ -28,4 +28,4 @@ jobs: TO_BRANCH: "storage-refactor" REVIEWERS: '["noahdietz"]' PULL_REQUEST_TITLE: "chore: sync main to storage-refactor" - PULL_REQUEST_BODY: "${{ steps.changes.outputs.change_notes }}" \ No newline at end of file + PULL_REQUEST_BODY: "${{ steps.changes.outputs.change_notes }}" From 633c46909877fbbf2aefa76dae135635ca4932cb Mon Sep 17 00:00:00 2001 From: noahdietz Date: Thu, 14 Jul 2022 12:46:31 -0700 Subject: [PATCH 5/5] add cloud-storage-dpe to reviewers --- .github/workflows/sync_branch.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sync_branch.yaml b/.github/workflows/sync_branch.yaml index ca03afa29f5..cbac1463251 100644 --- a/.github/workflows/sync_branch.yaml +++ b/.github/workflows/sync_branch.yaml @@ -26,6 +26,6 @@ jobs: GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} FROM_BRANCH: "main" TO_BRANCH: "storage-refactor" - REVIEWERS: '["noahdietz"]' + REVIEWERS: '["noahdietz", "cloud-storage-dpe"]' PULL_REQUEST_TITLE: "chore: sync main to storage-refactor" PULL_REQUEST_BODY: "${{ steps.changes.outputs.change_notes }}"