-
Notifications
You must be signed in to change notification settings - Fork 59
44 lines (43 loc) · 1.46 KB
/
CheckAndCommentAction.yaml
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
39
40
41
42
43
44
name: CheckAndComment
on:
pull_request:
jobs:
CheckFileChanged:
name: Check File Changed
runs-on: ubuntu-20.04
outputs:
files_changed: ${{ steps.file_changes.outputs.files }}
steps:
- uses: actions/checkout@v2
- id: file_changes
uses: trilom/file-changes-action@v1.2.3
CheckBugPullRequest:
if: ${{ github.event.label.name == 'bug' }}
name: Check Bug Pull Request
runs-on: ubuntu-20.04
needs: CheckFileChanged
steps:
- name: Check Release Note
if: contains(fromJson(needs.CheckFileChanged.outputs.files_changed), 'docs/ReleaseNotes.md') == false
uses: mshick/add-pr-comment@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
message: |
You labeld this PR as "bug", but Release Note does not updated, please check your PR.
allow-repeats: true
CheckFeaturePullRequest:
if: ${{ github.event.label.name == 'feature' }}
name: Check Feature Pull Request
runs-on: ubuntu-20.04
needs: CheckFileChanged
steps:
- name: Check Release Note
if: contains(fromJson(needs.CheckFileChanged.outputs.files_changed), 'docs/ReleaseNotes.md') == false
uses: mshick/add-pr-comment@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
message: |
You labeld this PR as "feature", but Release Note does not updated, please check your PR.
allow-repeats: true