Skip to content

chore: Map x-sdk-ruby-* to bapi/2024-10-01 #8

chore: Map x-sdk-ruby-* to bapi/2024-10-01

chore: Map x-sdk-ruby-* to bapi/2024-10-01 #8

name: Slack Notification
on:
pull_request:
types: [opened]
jobs:
slack-notify:
name: Slack Notification
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 0
show-progress: false
- name: Convert PR body to Slack format
id: slackify
uses: LoveToKnow/[email protected]
with:
text: ${{ github.event.pull_request.body }}
- name: Generate notification payload
id: notification
env:
PULL_REQUEST_DATA: ${{ toJson(github.event.pull_request) }}
run: |
payload=$(node ./.github/utils/slack-notify.mjs '${{ env.PULL_REQUEST_DATA }}' '${{ steps.slackify.outputs.text }}')
echo "payload=${payload//$'\n'/'%0A'}" >> $GITHUB_OUTPUT
- name: Send PR to Slack
id: slack
uses: slackapi/[email protected]
with:
payload: ${{ steps.notification.outputs.payload }}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_CHANGELOG_WEBHOOK_URL }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK