File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed
Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -87,19 +87,20 @@ jobs:
8787 if : ${{ always() }}
8888 needs : [ Build-Test, Sonar-Cloud ]
8989 runs-on : ubuntu-latest
90- name : New push to repo
90+ name : Send Slack Notification
9191 steps :
9292 - name : Send GitHub trigger payload to Slack Workflow Builder
9393 id : slack
94949595 with :
9696 payload : |
9797 {
98- "PR_URL": "${{ github.event.pull_request.html_url }}",
99- "Sonar_Status": "${{ needs.Sonar-Cloud.outputs.job-status }}",
100- "Test_Status": "${{ needs.Build-Test.outputs.job-status }}",
101- "Title": "${{ github.event.pull_request.title }}",
102- "Type": "${{ github.event.action }}"
98+ "PR_URL": "${{ github.event_name == 'push' && github.event.repository.html_url || github.event.pull_request.html_url }}",
99+ "Sonar_Status": "${{ needs.Sonar-Cloud.outputs.job-status }}",
100+ "Test_Status": "${{ needs.Build-Test.outputs.job-status }}",
101+ "Title": "${{ github.event_name == 'push' && github.event.commits[0].message || github.event.pull_request.title }}",
102+ "Type": "${{ github.event_name == 'push' && 'Merged' || github.event.action }}",
103+ "Author": "${{ github.actor }}"
103104 }
104105 env :
105- SLACK_WEBHOOK_URL : ${{ secrets.SLACK_WEBHOOK_URL }}
106+ SLACK_WEBHOOK_URL : ${{ secrets.SLACK_WEBHOOK_URL }}
You can’t perform that action at this time.
0 commit comments