Skip to content

Commit 2690557

Browse files
aduh95MoLow
authored andcommitted
tools: fix notify-on-push Slack messages
PR-URL: #47453 Refs: https://api.slack.com/reference/surfaces/formatting#special-mentions Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Debadree Chatterjee <debadree333@gmail.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
1 parent 3c62663 commit 2690557

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)