Skip to content

Open source, privacy-first web analytics. Lightweight, cookie-free Google Analytics alternative. Self-hosted or cloud.

Make BC notifications more compact and meaningful? (#5485)

hq197679872e54a
diff --git a/.github/workflows/build-private-images-ghcr.yml b/.github/workflows/build-private-images-ghcr.yml
index 45fae36450..61e7dc1377 100644
--- a/.github/workflows/build-private-images-ghcr.yml
+++ b/.github/workflows/build-private-images-ghcr.yml
@@ -69,6 +69,11 @@ jobs:
customHeaders: '{"Content-Type": "application/json"}'
data: '{"content": "<a href=\"https://github.com/plausible/analytics/actions/workflows/build-private-images.yml\">Build failed</a>"}'
+ - name: Get first line of commit message
+ if: ${{ success() && github.ref == 'refs/heads/master' }}
+ id: commitmsg
+ run: echo "first_line=$(git log -1 --pretty=%s)" >> $GITHUB_OUTPUT
+
- name: Notify team on success
if: ${{ success() && github.ref == 'refs/heads/master' }}
uses: fjogeleit/http-request-action@v1
@@ -77,7 +82,10 @@ jobs:
method: 'POST'
customHeaders: '{"Content-Type": "application/json"}'
escapeData: 'true'
- data: '{"content": "<h1>πŸš€ New changes are about to be deployed to production!</h1><br/><h3>πŸ‘· Author: ${{ github.actor }}</h3><br/><p>πŸ“ Commit message: ${{ github.event.head_commit.message }}</p><br/>"}'
+ data: |
+ {
+ "content": "<h1>πŸš€ Deploying ${{ steps.commitmsg.outputs.first_line }}</h1><p>Author: ${{ github.event.head_commit.author.name }}</p><p>Commit: <a href=\"${{ github.event.head_commit.url }}\">${{ github.sha }}</a></p>"
+ }
- name: Set Honeycomb marker on success
if: ${{ success() && github.ref == 'refs/heads/master' }}