File tree 2 files changed +17
-10
lines changed
2 files changed +17
-10
lines changed Original file line number Diff line number Diff line change 4
4
pull_request :
5
5
6
6
jobs :
7
+ get-submitter :
8
+ name : Get the username of the PR submitter
9
+ runs-on : ubuntu-latest
10
+ outputs :
11
+ submitter : ${{ steps.get-submitter.outputs.submitter }}
12
+ steps :
13
+ # cannot use `github.actor`: the triggering commit may be authored by a maintainer
14
+ - name : Get PR submitter
15
+ id : get-submitter
16
+ run : curl -sSfL https://api.github.com/repos/imsnif/bandwhich/pulls/${PR_NUMBER} | jq -r '"submitter=" + .user.login' | tee -a $GITHUB_OUTPUT
17
+
7
18
check-changelog :
8
19
name : Check for changelog entry
9
- runs-on : ubuntu-latest
10
- # allow dependabot PRs to have no changelog
11
- if : github.actor != 'dependabot[bot]'
20
+ needs : get-submitter
12
21
env :
13
22
PR_NUMBER : ${{ github.event.number }}
23
+ PR_SUBMITTER : ${{ needs.get-submitter.outputs.submitter }}
14
24
PR_BASE : ${{ github.base_ref }}
25
+ runs-on : ubuntu-latest
26
+ # allow dependabot PRs to have no changelog
27
+ if : ${{ needs.get-submitter.outputs.submitter != 'dependabot[bot]' }}
15
28
steps :
16
29
- uses : actions/checkout@v4
17
30
18
31
- name : Fetch PR base
19
32
run : git fetch --no-tags --prune --depth=1 origin
20
33
21
- # cannot use `github.actor`: the triggering commit may be authored by a maintainer
22
- - name : Get PR submitter
23
- id : get-submitter
24
- run : curl -sSfL https://api.github.com/repos/imsnif/bandwhich/pulls/${PR_NUMBER} | jq -r '"submitter=" + .user.login' | tee -a $GITHUB_OUTPUT
25
-
26
34
- name : Search for added line in changelog
27
- env :
28
- PR_SUBMITTER : ${{ steps.get-submitter.outputs.submitter }}
29
35
run : |
30
36
ADDED=$(git diff -U0 "origin/${PR_BASE}" HEAD -- CHANGELOG.md | grep -P '^\+[^\+].+$')
31
37
echo "Added lines in CHANGELOG.md:"
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
8
8
9
9
## Fixed
10
10
* Remove redundant imports #377 - @cyqsimon
11
+ * CI: use GitHub API to exempt dependabot from changelog requirement #378 - @cyqsimon
11
12
12
13
## Added
13
14
* CI: include generated assets in release archive #359 - @cyqsimon
You can’t perform that action at this time.
0 commit comments