From a2cd5c135d45d56e815d88778f77a5347492432f Mon Sep 17 00:00:00 2001 From: Omkar Khatavkar Date: Wed, 9 Nov 2022 14:16:33 +0530 Subject: [PATCH] fix the broken create issue with adding needs (#10251) Co-authored-by: Jitendra Yejare Co-authored-by: Jitendra Yejare --- .github/workflows/auto_assignment.yaml | 21 +++++++++++++++++++++ .github/workflows/auto_cherry_pick.yml | 2 +- .github/workflows/pull_request.yml | 10 ---------- 3 files changed, 22 insertions(+), 11 deletions(-) create mode 100644 .github/workflows/auto_assignment.yaml diff --git a/.github/workflows/auto_assignment.yaml b/.github/workflows/auto_assignment.yaml new file mode 100644 index 00000000000..5c4da31b09e --- /dev/null +++ b/.github/workflows/auto_assignment.yaml @@ -0,0 +1,21 @@ +name: 'Auto Assign' + +on: + pull_request_target: + types: + - opened + - ready_for_review + - reopened + - synchronize + + +jobs: + add-assignees: # This needed for to create the gh issue in case of failed auto0-cherry-pick + name: Add author to assignee + if: "!contains(github.event.pull_request.labels.*.name, 'Auto_Cherry_Picked')" + runs-on: ubuntu-latest + steps: + - uses: kentaro-m/auto-assign-action@v1.2.4 + with: + repo-token: "${{ secrets.CHERRYPICK_PAT || github.token }}" + configuration-path: ".github/auto_assign.yml" diff --git a/.github/workflows/auto_cherry_pick.yml b/.github/workflows/auto_cherry_pick.yml index df6b6ef6bf3..2109a12fc55 100644 --- a/.github/workflows/auto_cherry_pick.yml +++ b/.github/workflows/auto_cherry_pick.yml @@ -48,7 +48,7 @@ jobs: create-issue: runs-on: ubuntu-latest if: ${{ always() && contains(join(needs.*.result, ','), 'failure') }} - needs: auto-cherry-pick + needs: [previous-branch, auto-cherry-pick] env: to-branch: ${{ fromJson(needs.previous-branch.outputs.previous_branch) }} steps: diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 94d266fb65c..fd18f7826f7 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -64,13 +64,3 @@ jobs: - name: Analysis (git diff) if: failure() run: git diff - - # This needed for to create the gh issue in case of failed auto0-cherry-pick - add-assignees: - name: Add author to assignee - if: "!contains(github.event.pull_request.labels.*.name, 'Auto_Cherry_Picked')" - runs-on: ubuntu-latest - steps: - - uses: kentaro-m/auto-assign-action@v1.2.4 - with: - configuration-path: '.github/auto_assign.yml'