Skip to content

Update README.md

Update README.md #7

Workflow file for this run

name: PR Notifications
on:
pull_request_target:
branches: [main]
types: [opened, synchronize, edited, reopened, ready_for_review]
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
notify:
runs-on: ubuntu-latest
if: github.event.pull_request.draft != true
steps:
- shell: bash
run: |
USER_NAME=""
if [ -n "${{ github.event.pull_request.user.name }}" ]; then
USER_NAME=" (${{ github.event.pull_request.user.name }})"
fi
BRANCH_URL="${{ github.event.pull_request.head.repo.html_url }}/tree/${{ github.event.pull_request.head.ref }}"
MESSAGE="MR [!${{ github.event.pull_request.number }}](${{ github.event.pull_request.html_url }})"
MESSAGE+=" от [${{ github.event.pull_request.user.login }} ${USER_NAME}]"
MESSAGE+="(${{ github.event.pull_request.user.html_url }})"
MESSAGE+="(ветка: [${{ github.event.pull_request.head.ref }}](${BRANCH_URL}) готов на ревью."
curl -X POST \
-H "Content-Type: application/json" \
-d "{\"text\": \"$MESSAGE\"}" \
"${{ secrets.BUILD_CHAT_WEBHOOK }}"