ci: Push workflow notification - Generate slack message fix (#27439)
## Description - This PR updates the Generate slack message step to display PR title in Slack notification for better readibility
This commit is contained in:
parent
7279f9f09f
commit
8c1db6576d
|
|
@ -116,7 +116,11 @@ jobs:
|
|||
continue-on-error: true
|
||||
if: always()
|
||||
id: slack_notification
|
||||
env:
|
||||
EVENT_COMMITS: ${{ toJson(github.event.commits[0].message) }}
|
||||
run: |
|
||||
eventCommit=$(echo ${{env.EVENT_COMMITS}} | sed "s/'//g")
|
||||
echo "slack_username=$(echo "$eventCommit" | awk -F '\\\\n' '{print $1}' | sed 's/^"//;s/"$//')" >> $GITHUB_ENV
|
||||
if [[ ${{ needs.ci-test.result }} == 'failure' ]]; then
|
||||
echo "slack_message=There are test failures in the run. Cypress Dashboard: <https://internal.appsmith.com/app/cypressdashboard/rundetails-64ec3df0c632e24c00764938?branch=master&workflowId=${{ github.run_id }}&attempt=${{ github.run_attempt }}&selectiontype=test&testsstatus=failed&specsstatus=fail|Click here!>" >> $GITHUB_OUTPUT
|
||||
echo "slack_color=#FF0000" >> $GITHUB_OUTPUT
|
||||
|
|
@ -141,7 +145,7 @@ jobs:
|
|||
SLACK_ICON_EMOJI: ${{steps.slack_notification.outputs.slack_icon}}
|
||||
SLACK_ICON: https://app.slack.com/services/B05D17E4QVB
|
||||
SLACK_TITLE: "Result:"
|
||||
SLACK_USERNAME: ${{ toJson(github.event.commits[0].message) | awk -F '\\\\n' '{print $1}' | sed 's/^"//;s/"$//' }}
|
||||
SLACK_USERNAME: ${{steps.slack_notification.outputs.slack_username}}
|
||||
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_HOSTED }}
|
||||
MSG_MINIMAL: Ref,Event,Commit
|
||||
SLACK_FOOTER: "Push Workflow"
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user