forked from sofa-framework/sofa
-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (35 loc) · 1.05 KB
/
label-checker.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
---
name: Label Checker
on:
pull_request:
types:
- opened
- synchronize
- reopened
- labeled
- unlabeled
jobs:
check_labels:
name: Check labels
runs-on: ubuntu-latest
steps:
- name: Get PR labels
id: pr-labels
uses: joerick/[email protected]
- run: |
bin/run_normal_tests
if [ -n "enhancement" ]; then
echo "POUET POUET"
fi
- name: Comment
uses: actions/github-script@v4
with:
script: |
// Post a warning comment
github.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: ':x: @'+context.repo.owner+' your PR does not include any descriptive label :x:<br>:warning: :warning: :warning:<br> Make sure to add an appropriate [PR label](https://github.com/sofa-framework/sofa/labels) before merge.'
});
github-token: ${{ secrets.GITHUB_TOKEN }}