Skip to content

Commit

Permalink
Update filtered_github_webhooks.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
tsickert committed Sep 7, 2022
1 parent 4dcef8e commit 77e3d9c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/filtered_github_webhooks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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 }}

0 comments on commit 77e3d9c

Please sign in to comment.