Skip to content

Add cross-navigation footer #51

Add cross-navigation footer

Add cross-navigation footer #51

Workflow file for this run

name: PR Notification
on:
pull_request_target:
types: [opened]
jobs:
notify:
runs-on: ubuntu-latest
steps:
- name: Notify Slack
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
PR_TITLE: ${{ github.event.pull_request.title }}
PR_URL: ${{ github.event.pull_request.html_url }}
PR_AUTHOR: ${{ github.event.pull_request.user.login }}
PR_NUM: ${{ github.event.pull_request.number }}
run: |
if [ -z "$SLACK_WEBHOOK" ]; then echo "SLACK_WEBHOOK not set, skipping"; exit 0; fi
PAYLOAD=$(jq -n \
--arg text "New PR #${PR_NUM} on aimock by *${PR_AUTHOR}*: <${PR_URL}|${PR_TITLE}>" \
'{text: $text}')
curl -sf -X POST "$SLACK_WEBHOOK" \
-H "Content-Type: application/json" \
-d "$PAYLOAD"