Skip to content

Commit 03d3f2c

Browse files
committed
Actions: Add change note checker
1 parent ce1d8de commit 03d3f2c

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
on:
2+
pull_request_target:
3+
paths:
4+
- '**/*.ql'
5+
- '**/*.qll'
6+
- '!**/experimental/**'
7+
8+
jobs:
9+
check-change-note:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Check if change note file is present
13+
uses: dorny/paths-filter@v2
14+
id: paths_filter
15+
with:
16+
filters: |
17+
change_note:
18+
- '**/change-notes/*.md'
19+
- name: Get PR labels
20+
id: pr-labels
21+
uses: joerick/pr-labels-action@v1.0.6
22+
- name: Inform the PR author
23+
uses: actions/github-script@v3
24+
if: |
25+
steps.paths_filter.outputs.change_note == 'false' &&
26+
!contains(steps.pr-labels.outputs.labels, ' minor-change ')
27+
with:
28+
github-token: ${{secrets.GITHUB_TOKEN}}
29+
script: |
30+
github.issues.addLabels({
31+
issue_number: context.issue.number,
32+
owner: context.repo.owner,
33+
repo: context.repo.repo,
34+
labels: ['Needs change note']
35+
})

0 commit comments

Comments
 (0)