Skip to content

Commit eac1daa

Browse files
committed
pr review
1 parent 39f18ee commit eac1daa

1 file changed

Lines changed: 35 additions & 0 deletions

File tree

.github/workflows/pr_review.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: PR Notifications
2+
3+
on:
4+
pull_request_target:
5+
branches: [main]
6+
types: [opened, synchronize, edited, reopened, ready_for_review]
7+
8+
permissions:
9+
contents: read
10+
11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.ref }}
13+
cancel-in-progress: true
14+
15+
jobs:
16+
check-needs:
17+
runs-on: ubuntu-latest
18+
if: github.event.pull_request.draft != true
19+
steps:
20+
- run: exit 0
21+
22+
notify:
23+
runs-on: ubuntu-latest
24+
needs: [check-needs]
25+
steps:
26+
- shell: bash
27+
run: |
28+
MESSAGE="\
29+
MR [!${{ github.event.pull_request.id }}](${{ github.event.pull_request.url }}) \
30+
от [!${{ github.event.pull_request.user.login }} (${{ github.event.pull_request.user.name }})]\
31+
(${{ github.event.pull_request.user.url }}) \
32+
(ветка: [${{ github.event.pull_request.head.ref }}]\
33+
(${{ github.event.pull_request.head.repo.branches_url }}) готов на ревью.\
34+
"
35+
curl -X POST -H "Content-Type: application/json" -d "{\"text\": \"$MESSAGE\"}" "${{ secrets.BUILD_CHAT_WEBHOOK }}"

0 commit comments

Comments
 (0)