feat: add supavisor examples #52
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Notify about PRs | |
on: | |
pull_request: | |
types: [opened, reopened] | |
pull_request_target: | |
types: [opened, reopened] | |
jobs: | |
notify_slack: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Send alert to Slack | |
id: slack | |
uses: slackapi/[email protected] | |
env: | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | |
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK | |
with: | |
payload: | | |
{ | |
"text": "GitHub Pull Request opened in: ${{ github.event.repository.name }}", | |
"blocks": [ | |
{ | |
"type": "section", | |
"text": { | |
"type": "mrkdwn", | |
"text": "GitHub Pull Request opened in: ${{ github.event.repository.name }} \n#${{ github.event.pull_request.number }} <${{ github.event.pull_request.html_url}}|${{ github.event.pull_request.title }}>" | |
} | |
}, | |
{ | |
"type": "section", | |
"text": { | |
"type": "mrkdwn", | |
"text": "By ${{ github.event.pull_request.author_association }}: <${{ github.event.pull_request.user.html_url }}|${{ github.event.pull_request.user.login }}>\n\n" | |
}, | |
"accessory": { | |
"type": "image", | |
"image_url": "${{ github.event.pull_request.user.avatar_url }}", | |
"alt_text": "Avatar" | |
} | |
}, | |
{ | |
"type": "section", | |
"text": { | |
"type": "mrkdwn", | |
"text": ${{ toJSON(github.event.pull_request.body) }} | |
} | |
} | |
] | |
} | |