From 77e3d9cd882e2d1af414e90ece2d6676b56784ce Mon Sep 17 00:00:00 2001 From: Thomas Sickert Date: Wed, 7 Sep 2022 19:37:28 -0400 Subject: [PATCH] Update filtered_github_webhooks.yml --- .github/workflows/filtered_github_webhooks.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/filtered_github_webhooks.yml b/.github/workflows/filtered_github_webhooks.yml index 0b69fdb..59bdcfc 100644 --- a/.github/workflows/filtered_github_webhooks.yml +++ b/.github/workflows/filtered_github_webhooks.yml @@ -7,9 +7,13 @@ on: jobs: notify_if_not_dependabot: - if: ${{ github.actor }} != 'dependabot' + if: ${{ github.event.pull_request.user.login }} != 'dependabot' runs-on: ubuntu-latest steps: + - id: truncate-body + run: | + STRING= ${{ github.event.pull_request.body }} | sed 's/\(.\{3997\}\).*/\1.../' + echo "::set-output name=body::$STRING" - name: Discord Webhook Action uses: tsickert/discord-webhook@v5.1.0 with: @@ -20,5 +24,5 @@ jobs: embed-author-url: ${{ github.event.pull_request.user.html_url }} embed-author-icon-url: ${{ github.event.pull_request.user.avatar_url }} embed-title: '[${{ github.event.repository.full_name }}] Pull request ${{ github.event.action }}: #${{ github.event.number }} ${{ github.event.pull_request.title }}' - embed-description: ${{ github.event.pull_request.body }} + embed-description: ${{ steps.truncate-body.outputs.body }} embed-url: ${{ github.event.pull_request.html_url }}