From 349456970d04417981076b7a39078040b325d128 Mon Sep 17 00:00:00 2001 From: Jitendra Yejare Date: Mon, 25 Sep 2023 13:43:05 +0530 Subject: [PATCH] [6.12.z] Fix dependecies PR automerge in zStream Branches (#12709) Fix dependecies PR automerge in zStream Branche --- .github/workflows/auto_cherry_pick.yml | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/.github/workflows/auto_cherry_pick.yml b/.github/workflows/auto_cherry_pick.yml index 7be04236b17..f36ff0119e0 100644 --- a/.github/workflows/auto_cherry_pick.yml +++ b/.github/workflows/auto_cherry_pick.yml @@ -10,6 +10,7 @@ env: assignee: ${{ github.event.pull_request.assignee.login }} title: ${{ github.event.pull_request.title }} number: ${{ github.event.number }} + is_dependabot_pr: '' jobs: @@ -45,6 +46,12 @@ jobs: with: fetch-depth: 0 + ## Set env var for dependencies label PR + - name: Set env var is_dependabot_pr to `dependencies` to set the label + if: contains(github.event.pull_request.labels.*.name, 'dependencies') + run: | + echo "is_dependabot_pr=dependencies" >> $GITHUB_ENV + ## CherryPicking and AutoMerging - name: Cherrypicking to zStream branch id: cherrypick @@ -56,19 +63,8 @@ jobs: labels: | Auto_Cherry_Picked ${{ matrix.label }} - assignees: ${{ env.assignee }} - - - name: Add dependencies label, if merged pr author is dependabot[bot] - id: dependencies - if: | - contains(github.event.pull_request.labels.*.name, 'dependencies') && - github.event.pull_request.user.login == 'dependabot[bot]' - uses: jyejare/github-cherry-pick-action@main - with: - token: ${{ secrets.CHERRYPICK_PAT }} - branch: ${{ matrix.label }} - labels: | - dependencies + No-CherryPick + ${{ env.is_dependabot_pr }} assignees: ${{ env.assignee }} - name: Add Parent PR's PRT comment to Auto_Cherry_Picked PR's