Skip to content

Commit

Permalink
GHA: Added support to handle auto-cherry-pick failure & create issue (#…
Browse files Browse the repository at this point in the history
…10211)

* GHA: Added support to handle auto-cherry-pick failure & create issue

* added support for the google chat notification bot for AutocherryPick
  • Loading branch information
omkarkhatavkar authored Oct 31, 2022
1 parent bda2823 commit 4ffbb5e
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/auto_cherry_pick.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,32 @@ jobs:
labels: |
Auto_Cherry_Picked
${{ matrix.to_branch }}
create-issue:
runs-on: ubuntu-latest
if: ${{ always() && contains(join(needs.*.result, ','), 'failure') }}
needs: auto-cherry-pick
steps:
- name: Create Issue on Failed Auto Cherrypick
uses: dacbd/create-issue-action@main
with:
token: ${{ secrets.CHERRYPICK_PAT }}
title: "[Failed-AutoCherryPick] - ${{ github.event.pull_request.title }}"
body: |
#### 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 }}"

google-chat-notification:
runs-on: ubuntu-latest
if: ${{ always() && contains(join(needs.*.result, ','), 'failure') }}
needs: auto-cherry-pick
steps:
- name: Google Chat Notification - Robottelo
uses: Co-qn/google-chat-notification@releases/v1
with:
name: "[Failed-AutoCherryPick] - ${{ github.event.pull_request.title }}"
url: ${{ secrets.GCHAT_REVIEWERS_WEBHOOK }}
status: failure

0 comments on commit 4ffbb5e

Please sign in to comment.