From ca5c89a842a17d10caa5fffa9ca380055ebced49 Mon Sep 17 00:00:00 2001 From: Antoine du Hamel Date: Sat, 8 Apr 2023 17:17:50 +0200 Subject: [PATCH] tools: fix notify-on-push Slack messages PR-URL: https://github.com/nodejs/node/pull/47453 Refs: https://api.slack.com/reference/surfaces/formatting#special-mentions Reviewed-By: Richard Lau Reviewed-By: Debadree Chatterjee Reviewed-By: Yagiz Nizipli --- .github/workflows/notify-on-push.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/notify-on-push.yml b/.github/workflows/notify-on-push.yml index d1899984527ba4..6a307c6ff98245 100644 --- a/.github/workflows/notify-on-push.yml +++ b/.github/workflows/notify-on-push.yml @@ -20,7 +20,7 @@ jobs: SLACK_ICON: https://github.com/nodejs.png?size=48 SLACK_TITLE: ${{ github.actor }} force-pushed to ${{ github.ref }} SLACK_MESSAGE: | - @here A commit was force-pushed to by + A commit was force-pushed to by Before: After: @@ -51,7 +51,7 @@ jobs: if: ${{ env.PR_ID }} run: | gh pr comment ${{ env.PR_ID }} --repo "${{ github.repository }}" \ - --body "A commit referencing this Pull Request was pushed to `main` by @${{ github.actor }} without the expected commit metadata added to its message." + --body "A commit referencing this Pull Request was pushed to `${{ github.ref_name }}` by @${{ github.actor }} with an invalid commit message." env: GH_TOKEN: ${{ github.token }} - name: Slack Notification @@ -62,7 +62,7 @@ jobs: SLACK_ICON: https://github.com/nodejs.png?size=48 SLACK_TITLE: Invalid commit was pushed to ${{ github.repository.default_branch }} SLACK_MESSAGE: | - @here A commit lacking the expected metadata was pushed to by . + A commit with an invalid message was pushed to by . Before: After: