Skip to content

Feature/3.1.3 add auditing #5

Feature/3.1.3 add auditing

Feature/3.1.3 add auditing #5

name: Notify Slack on PR Merge
on:
pull_request:
types: [closed]
jobs:
notify:
runs-on: ubuntu-latest
steps:
- name: Get GitHub User Name
id: get_username
run: |
USERNAME=$(curl -s "https://api.github.com/users/${{ github.actor }}" | jq -r '.name')
if [ "$USERNAME" == "null" ]; then
USERNAME="${{ github.actor }}"
fi
echo "USERNAME=$USERNAME" >> $GITHUB_ENV
- name: Send Slack Notification
if: github.event.pull_request.merged == true
uses: rtCamp/action-slack-notify@v2
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
SLACK_MESSAGE: |
✅ *PR Merged!*
🚀 *${{ github.event.pull_request.title }}*
🛠 Merged by: `${{ env.USERNAME }}`
📝 Description:
- ${{ github.event.pull_request.body }}
🔗 *PR URL:* ${{ github.event.pull_request.html_url }}
SLACK_USERNAME: "GitHub Actions"
SLACK_ICON_EMOJI: ":white_check_mark:"