From 80c8b5bde19e83e484c85d3e44f7795a069bb9d2 Mon Sep 17 00:00:00 2001 From: Peter Nied Date: Wed, 9 Nov 2022 10:47:55 -0600 Subject: [PATCH 1/2] Reuse existing pull request in increment plugin workflow Not all plugins can immediately merge changes from this workflow and need to add changes before the generated pull request can be merged. Aspiring issue: https://github.com/opensearch-project/security/pull/2210#issuecomment-1308987770 Signed-off-by: Peter Nied --- .github/workflows/increment-plugin-versions.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/increment-plugin-versions.yml b/.github/workflows/increment-plugin-versions.yml index 65ac0f28d9..08399a86e3 100644 --- a/.github/workflows/increment-plugin-versions.yml +++ b/.github/workflows/increment-plugin-versions.yml @@ -68,6 +68,9 @@ jobs: with: repository: opensearch-project/${{ matrix.entry.repo }} ref: ${{ matrix.branch }} + - name: Attempt to reuse existing pull request in plugin repo + run: git checkout create-pull-request/${{ env.OPENSEARCH_VERSION }} + continue-on-error: true - name: Increment Version in ${{ matrix.entry.repo }} run: | echo "OpenSearch Core repo version on branch ${{ matrix.branch }} is ${{ env.OPENSEARCH_VERSION_NUMBER }}" From 55260c56852896b79f1e16ccf4067545ecf9499b Mon Sep 17 00:00:00 2001 From: Peter Nied Date: Wed, 9 Nov 2022 11:54:00 -0600 Subject: [PATCH 2/2] Make sure to get the full history from the remote repository https://github.com/actions/checkout#fetch-all-history-for-all-tags-and-branches Signed-off-by: Peter Nied Signed-off-by: Peter Nied --- .github/workflows/increment-plugin-versions.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/increment-plugin-versions.yml b/.github/workflows/increment-plugin-versions.yml index 08399a86e3..09b62e6b5d 100644 --- a/.github/workflows/increment-plugin-versions.yml +++ b/.github/workflows/increment-plugin-versions.yml @@ -68,6 +68,7 @@ jobs: with: repository: opensearch-project/${{ matrix.entry.repo }} ref: ${{ matrix.branch }} + fetch-depth: 0 - name: Attempt to reuse existing pull request in plugin repo run: git checkout create-pull-request/${{ env.OPENSEARCH_VERSION }} continue-on-error: true