File tree Expand file tree Collapse file tree 1 file changed +9
-19
lines changed Expand file tree Collapse file tree 1 file changed +9
-19
lines changed Original file line number Diff line number Diff line change @@ -10,24 +10,14 @@ jobs:
10
10
check-change-note :
11
11
runs-on : ubuntu-latest
12
12
steps :
13
- - name : Check if change note file is present
14
- uses : dorny/paths-filter@7c0f15b688b020e95e00f15c61299b022f08ca95 # v2.8.0
15
- id : paths_filter
16
- with :
17
- filters : |
18
- change_note:
19
- - '**/change-notes/*.md'
20
- - name : Get PR labels
21
- id : pr-labels
22
- uses : joerick/pr-labels-action@0a4cc4ee0ab557ec0b1ae1157fa6fa7f9f4c494b # v1.0.6
23
- - name : Fail if change note is missing
24
- uses : actions/github-script@v3
13
+ - uses : actions/checkout@v2
14
+ - name : Fail if no change note found. To fix, either add one, or add the `no-change-note-required` label.
25
15
if : |
26
16
github.event.pull_request.draft == false &&
27
- steps.paths_filter.outputs.change_note == 'false' &&
28
- !contains(steps.pr-labels.outputs.labels, ' no-change-note-required ')
29
- with :
30
- github-token : ${{secrets.GITHUB_TOKEN}}
31
- script : |
32
- core.setFailed('No change note found.' +
33
- ' Either add one, or add the `no- change-note-required` label.')
17
+ !contains(github.event.pull_request.labels.*.name, 'no-change-note-required')
18
+ env :
19
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
20
+ run : |
21
+ gh api 'repos/${{github.repository}}/pulls/${{github.event.number}}/files' --paginate |
22
+ jq '.[].filename' --raw-output |
23
+ grep '/ change-notes/.*\.md$'
You can’t perform that action at this time.
0 commit comments