diff --git a/.changeset/afraid-rats-clap.md b/.changeset/afraid-rats-clap.md new file mode 100644 index 000000000..08195742e --- /dev/null +++ b/.changeset/afraid-rats-clap.md @@ -0,0 +1,5 @@ +--- +"reusable-dependabump": patch +--- + +Improve slack notification messages diff --git a/.github/workflows/reusable-dependabump.yml b/.github/workflows/reusable-dependabump.yml index 058937423..691b180db 100644 --- a/.github/workflows/reusable-dependabump.yml +++ b/.github/workflows/reusable-dependabump.yml @@ -89,7 +89,8 @@ jobs: token: ${{ secrets.SLACK_TOKEN }} payload: | channel: ${{ secrets.SLACK_CHANNEL_ID}} - text: "Failed to check for vulnerabilities in `${{ github.event.repository.name }}`: <${{ format('https://github.com/{0}/actions/runs/{1}', github.repository, github.run_id) }}|Run>" + text: | + Failed to check for vulnerable dependencies in `${{ github.event.repository.name }}` - <${{ format('https://github.com/{0}/actions/runs/{1}', github.repository, github.run_id) }}|Run> - name: Exit on Failure if: ${{ steps.install.outcome == 'failure' || steps.bump.outcome == 'failure' || steps.post-bump.outcome == 'failure' }} @@ -114,7 +115,9 @@ jobs: token: ${{ secrets.SLACK_TOKEN }} payload: | channel: ${{ secrets.SLACK_CHANNEL_ID}} - text: "Vulnerabilities detected in `${{ github.event.repository.name }}`, but failed to create PR: <${{ format('https://github.com/{0}/actions/runs/{1}', github.repository, github.run_id) }}|Run>" + text: | + Vulnerable dependencies detected in `${{ github.event.repository.name }}`! :panic: + Failed to create PR: <${{ format('https://github.com/{0}/actions/runs/{1}', github.repository, github.run_id) }}|Run> - name: Exit on PR Failure if: ${{ steps.pr.outcome == 'failure' }} @@ -128,4 +131,6 @@ jobs: token: ${{ secrets.SLACK_TOKEN }} payload: | channel: ${{ secrets.SLACK_CHANNEL_ID}} - text: "Vulnerabilities detected in `${{ github.event.repository.name }}` - upgrading dependencies: <${{ format('https://github.com/{0}/actions/runs/{1}', github.repository, github.run_id) }}|Run> - <${{ steps.pr.outputs.pull-request-url }}|PR> :review-time:" + text: | + Vulnerable dependencies detected in `${{ github.event.repository.name }}`! :panic: - <${{ format('https://github.com/{0}/actions/runs/{1}', github.repository, github.run_id) }}|Run> + Upgrade PR for review: ${{ steps.pr.outputs.pull-request-url }} diff --git a/workflows/reusable-dependabump/reusable-dependabump.yml b/workflows/reusable-dependabump/reusable-dependabump.yml index 503a32f43..f1727fc84 100644 --- a/workflows/reusable-dependabump/reusable-dependabump.yml +++ b/workflows/reusable-dependabump/reusable-dependabump.yml @@ -85,7 +85,8 @@ jobs: token: ${{ secrets.SLACK_TOKEN }} payload: | channel: ${{ secrets.SLACK_CHANNEL_ID}} - text: "Failed to check for vulnerabilities in `${{ github.event.repository.name }}`: <${{ format('https://github.com/{0}/actions/runs/{1}', github.repository, github.run_id) }}|Run>" + text: | + Failed to check for vulnerable dependencies in `${{ github.event.repository.name }}` - <${{ format('https://github.com/{0}/actions/runs/{1}', github.repository, github.run_id) }}|Run> - name: Exit on Failure if: ${{ steps.install.outcome == 'failure' || steps.bump.outcome == 'failure' || steps.post-bump.outcome == 'failure' }} @@ -110,7 +111,9 @@ jobs: token: ${{ secrets.SLACK_TOKEN }} payload: | channel: ${{ secrets.SLACK_CHANNEL_ID}} - text: "Vulnerabilities detected in `${{ github.event.repository.name }}`, but failed to create PR: <${{ format('https://github.com/{0}/actions/runs/{1}', github.repository, github.run_id) }}|Run>" + text: | + Vulnerable dependencies detected in `${{ github.event.repository.name }}`! :panic: + Failed to create PR: <${{ format('https://github.com/{0}/actions/runs/{1}', github.repository, github.run_id) }}|Run> - name: Exit on PR Failure if: ${{ steps.pr.outcome == 'failure' }} @@ -124,4 +127,6 @@ jobs: token: ${{ secrets.SLACK_TOKEN }} payload: | channel: ${{ secrets.SLACK_CHANNEL_ID}} - text: "Vulnerabilities detected in `${{ github.event.repository.name }}` - upgrading dependencies: <${{ format('https://github.com/{0}/actions/runs/{1}', github.repository, github.run_id) }}|Run> - <${{ steps.pr.outputs.pull-request-url }}|PR> :review-time:" + text: | + Vulnerable dependencies detected in `${{ github.event.repository.name }}`! :panic: - <${{ format('https://github.com/{0}/actions/runs/{1}', github.repository, github.run_id) }}|Run> + Upgrade PR for review: ${{ steps.pr.outputs.pull-request-url }}