File tree Expand file tree Collapse file tree 1 file changed +39
-0
lines changed Expand file tree Collapse file tree 1 file changed +39
-0
lines changed Original file line number Diff line number Diff line change 1+ name : AUTHORS file
2+
3+ on :
4+ pull_request : { }
5+
6+ jobs :
7+ authors-file :
8+ name : AUTHORS file
9+ runs-on : ubuntu-latest
10+
11+ steps :
12+ - name : Checkout HEAD
13+ uses : actions/checkout@v3
14+ with :
15+ fetch-depth : 0
16+
17+ - name : Check whether ./AUTHORS is up-to-date
18+ run : |
19+ set -exo pipefail
20+ sort -uo AUTHORS AUTHORS
21+ git add AUTHORS
22+ git log --format='format:%aN <%aE>' "$(
23+ git merge-base HEAD^1 HEAD^2
24+ )..HEAD^2" >> AUTHORS
25+ sort -uo AUTHORS AUTHORS
26+ git diff AUTHORS >> AUTHORS.diff
27+
28+ - name: Complain if ./AUTHORS isn't up-to-date
29+ run: |
30+ if [ -s AUTHORS.diff ]; then
31+ cat <<'EOF' >&2
32+ There are the following new authors. If the commit author data is correct,
33+ either add them to the AUTHORS file or update .mailmap. See gitmailmap(5) or:
34+ https://git-scm.com/docs/gitmailmap
35+ Don't hesitate to ask us for help if necessary.
36+ EOF
37+ cat AUTHORS.diff
38+ exit 1
39+ fi
You can’t perform that action at this time.
0 commit comments