Files
worker-vllm/.github/workflows/slack-pr-issue-notify.yml
T

57 lines
1.9 KiB
YAML

name: Slack PR and Issue Notifications
on:
pull_request:
types: [opened]
issues:
types: [opened]
jobs:
notify:
runs-on: ubuntu-latest
steps:
- name: Notify Slack - New PR
if: github.event_name == 'pull_request'
run: |
curl -sf -X POST "${{ secrets.SLACK_WEBHOOK_URL }}" \
-H "Content-Type: application/json" \
-d '{
"text": ":rocket: New PR in worker-vllm: *${{ github.event.pull_request.title }}*",
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": ":rocket: *New Pull Request — worker-vllm*\n*<${{ github.event.pull_request.html_url }}|${{ github.event.pull_request.title }}>*\nOpened by *${{ github.event.pull_request.user.login }}*"
}
},
{
"type": "context",
"elements": [
{
"type": "mrkdwn",
"text": "${{ github.event.pull_request.base.ref }} ← ${{ github.event.pull_request.head.ref }}"
}
]
}
]
}'
- name: Notify Slack - New Issue
if: github.event_name == 'issues'
run: |
curl -sf -X POST "${{ secrets.SLACK_WEBHOOK_URL }}" \
-H "Content-Type: application/json" \
-d '{
"text": ":bug: New issue in worker-vllm: *${{ github.event.issue.title }}*",
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": ":bug: *New Issue — worker-vllm*\n*<${{ github.event.issue.html_url }}|${{ github.event.issue.title }}>*\nOpened by *${{ github.event.issue.user.login }}*"
}
}
]
}'