@@ -17,6 +17,9 @@ concurrency:
1717 group : ${{ github.workflow }}-${{ inputs.branch_name }}
1818 cancel-in-progress : true
1919
20+ env :
21+ SLACK_CHANNEL_ID : " C02LMULF4NA"
22+
2023jobs :
2124 merge :
2225 name : Merge
8184 repository : HumanSignal/actions-hub
8285 path : ./.github/actions-hub
8386
87+ - name : Get Upstream PRs
88+ uses : ./.github/actions-hub/actions/follow-merge-upstream-prs
89+ id : upstream-prs
90+ with :
91+ branch_name : " ${{ inputs.branch_name }}"
92+ poetry_repositories : " "
93+ infra_repositories : " label-studio-client-generator"
94+ github_token : " ${{ secrets.GIT_PAT }}"
95+
8496 - name : Team details
8597 id : team_details
8698 uses : ./.github/actions-hub/actions/team-details
@@ -89,22 +101,14 @@ jobs:
89101 jira-username : " ${{ secrets.JIRA_USERNAME }}"
90102 jira-token : " ${{ secrets.JIRA_TOKEN }}"
91103 github_token : " ${{ secrets.GIT_PAT }}"
104+ github-username : " ${{ steps.upstream-prs.outputs.author_username }}"
92105 continue-on-error : true
93106
94107 - name : Git Configure
95108 uses : ./.github/actions-hub/actions/git-configure
96109 with :
97110 username : " ${{ steps.team_details.outputs.github-username }}"
98111
99- - name : Get Upstream PRs
100- uses : ./.github/actions-hub/actions/follow-merge-upstream-prs
101- id : upstream-prs
102- with :
103- branch_name : " ${{ inputs.branch_name }}"
104- poetry_repositories : " "
105- infra_repositories : " label-studio-client-generator"
106- github_token : " ${{ secrets.GIT_PAT }}"
107-
108112 - name : Find or Create branch
109113 uses : ./.github/actions-hub/actions/github-find-or-create-branch
110114 id : get-branch
@@ -233,16 +237,21 @@ jobs:
233237 }
234238 }'
235239
236- # - name: Notify on failure
237- # uses: ./.github/actions-hub/actions/github-create-comment
238- # if: failure()
239- # with:
240- # github_token: ${{ secrets.GIT_PAT }}
241- # repository: "${{ steps.fm.outputs.repo_name }}"
242- # issue_number: "${{ steps.fm.outputs.pr_number }}"
243- # body: |
244- # Follow Merge downstream workflow has been failed.
245- # > [Workflow run](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})
240+ - name : Send Slack Notification on failure
241+ if : failure()
242+ 243+ env :
244+ MENTION : " <@${{ steps.team_details.outputs.slack-user-id }}>"
245+ WORKFLOW : " <https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}|workflow>"
246+ with :
247+ method : chat.postMessage
248+ token : ${{ secrets.SLACK_LSE_BOT_TOKEN }}
249+ payload : |
250+ channel: "${{ env.SLACK_CHANNEL_ID }}"
251+ text: >+
252+ :x: Follow Merge downstream workflow has been failed.
253+ [ ${{ env.WORKFLOW }} ]
254+ ${{ steps.team_details.outputs.slack-user-id && env.MENTION || '' }}
246255
247256 - name : Add reaction to chat ops command comment
248257 if : always() && github.event.client_payload.github.payload.comment.id && github.event.client_payload.github.payload.repository.full_name
0 commit comments