Skip to content

Commit

Permalink
fixing auto assigning to correct user rather SATQE bot (SatelliteQE#1…
Browse files Browse the repository at this point in the history
  • Loading branch information
omkarkhatavkar authored Nov 7, 2022
1 parent ae8ea81 commit 471fc77
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
1 change: 1 addition & 0 deletions .github/auto_assign.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
addAssignees: author
11 changes: 8 additions & 3 deletions .github/workflows/auto_cherry_pick.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,14 @@ jobs:
labels: |
Auto_Cherry_Picked
${{ matrix.to_branch }}
assignees: "${{ github.event.pull_request.assignee.login }}"

create-issue:
runs-on: ubuntu-latest
if: ${{ always() && contains(join(needs.*.result, ','), 'failure') }}
needs: auto-cherry-pick
env:
to-branch: ${{ fromJson(needs.previous-branch.outputs.previous_branch) }}
steps:
- name: Create Issue on Failed Auto Cherrypick
uses: dacbd/create-issue-action@main
Expand All @@ -58,8 +61,10 @@ jobs:
#### Auto-Cherry-Pick WorkFlow Failure:
- [Failed Cherrypick Action](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})
- [Parent Pull Request](https://github.com/${{ github.repository }}/pull/${{ github.event.number }})
labels: Failed_AutoCherryPick
assignees: "${{ github.event.pull_request.user.login }}"
labels: |
Failed_AutoCherryPick
${{ env.to_branch }}
assignees: "${{ github.event.pull_request.assignee.login }}"

google-chat-notification:
runs-on: ubuntu-latest
Expand All @@ -69,6 +74,6 @@ jobs:
- name: Google Chat Notification - Robottelo
uses: Co-qn/google-chat-notification@releases/v1
with:
name: "[Failed-AutoCherryPick] - ${{ github.event.pull_request.title }}"
name: "${{ github.event.pull_request.title }}"
url: ${{ secrets.GCHAT_REVIEWERS_WEBHOOK }}
status: failure
10 changes: 10 additions & 0 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,13 @@ 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/[email protected]
with:
configuration-path: '.github/auto_assign.yml'

0 comments on commit 471fc77

Please sign in to comment.