Skip to content

Commit 4fbfa3c

Browse files
aduh95RafaelGSS
authored andcommittedApr 13, 2023
tools: fix notify-on-push Slack messages
PR-URL: #47453 Refs: https://api.slack.com/reference/surfaces/formatting#special-mentions Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Debadree Chatterjee <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]>
1 parent b1f2ff1 commit 4fbfa3c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed
 

‎.github/workflows/notify-on-push.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
SLACK_ICON: https://github.com/nodejs.png?size=48
2121
SLACK_TITLE: ${{ github.actor }} force-pushed to ${{ github.ref }}
2222
SLACK_MESSAGE: |
23-
@here A commit was force-pushed to <https://github.com/${{ github.repository }}/tree/${{ github.ref_name }}|${{ github.repository }}@${{ github.ref_name }}> by <https://github.com/${{ github.actor }}|${{ github.actor }}>
23+
<!here> A commit was force-pushed to <https://github.com/${{ github.repository }}/tree/${{ github.ref_name }}|${{ github.repository }}@${{ github.ref_name }}> by <https://github.com/${{ github.actor }}|${{ github.actor }}>
2424
2525
Before: <https://github.com/${{ github.repository }}/commit/${{ github.event.before }}|${{ github.event.before }}>
2626
After: <https://github.com/${{ github.repository }}/commit/${{ github.event.after }}|${{ github.event.after }}>
@@ -51,7 +51,7 @@ jobs:
5151
if: ${{ env.PR_ID }}
5252
run: |
5353
gh pr comment ${{ env.PR_ID }} --repo "${{ github.repository }}" \
54-
--body "A commit referencing this Pull Request was pushed to `main` by @${{ github.actor }} without the expected commit metadata added to its message."
54+
--body "A commit referencing this Pull Request was pushed to `${{ github.ref_name }}` by @${{ github.actor }} with an invalid commit message."
5555
env:
5656
GH_TOKEN: ${{ github.token }}
5757
- name: Slack Notification
@@ -62,7 +62,7 @@ jobs:
6262
SLACK_ICON: https://github.com/nodejs.png?size=48
6363
SLACK_TITLE: Invalid commit was pushed to ${{ github.repository.default_branch }}
6464
SLACK_MESSAGE: |
65-
@here A commit lacking the expected metadata was pushed to <https://github.com/${{ github.repository }}/tree/${{ github.ref_name }}|${{ github.repository }}@${{ github.ref_name }}> by <https://github.com/${{ github.actor }}|${{ github.actor }}>.
65+
<!here> A commit with an invalid message was pushed to <https://github.com/${{ github.repository }}/tree/${{ github.ref_name }}|${{ github.repository }}@${{ github.ref_name }}> by <https://github.com/${{ github.actor }}|${{ github.actor }}>.
6666
6767
Before: <https://github.com/${{ github.repository }}/commit/${{ github.event.before }}|${{ github.event.before }}>
6868
After: <https://github.com/${{ github.repository }}/commit/${{ github.event.after }}|${{ github.event.after }}>

0 commit comments

Comments
 (0)
Please sign in to comment.