Skip to content

Commit 77e3d9c

Browse files
authored
Update filtered_github_webhooks.yml
1 parent 4dcef8e commit 77e3d9c

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

.github/workflows/filtered_github_webhooks.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,13 @@ on:
77

88
jobs:
99
notify_if_not_dependabot:
10-
if: ${{ github.actor }} != 'dependabot'
10+
if: ${{ github.event.pull_request.user.login }} != 'dependabot'
1111
runs-on: ubuntu-latest
1212
steps:
13+
- id: truncate-body
14+
run: |
15+
STRING= ${{ github.event.pull_request.body }} | sed 's/\(.\{3997\}\).*/\1.../'
16+
echo "::set-output name=body::$STRING"
1317
- name: Discord Webhook Action
1418
uses: tsickert/discord-webhook@v5.1.0
1519
with:
@@ -20,5 +24,5 @@ jobs:
2024
embed-author-url: ${{ github.event.pull_request.user.html_url }}
2125
embed-author-icon-url: ${{ github.event.pull_request.user.avatar_url }}
2226
embed-title: '[${{ github.event.repository.full_name }}] Pull request ${{ github.event.action }}: #${{ github.event.number }} ${{ github.event.pull_request.title }}'
23-
embed-description: ${{ github.event.pull_request.body }}
27+
embed-description: ${{ steps.truncate-body.outputs.body }}
2428
embed-url: ${{ github.event.pull_request.html_url }}

0 commit comments

Comments
 (0)