diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 11:32:39 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 11:32:39 +0000 |
commit | 56ae875861ab260b80a030f50c4aff9f9dc8fff0 (patch) | |
tree | 531412110fc901a5918c7f7442202804a83cada9 /.github/workflows/authors-file.yml | |
parent | Initial commit. (diff) | |
download | icinga2-56ae875861ab260b80a030f50c4aff9f9dc8fff0.tar.xz icinga2-56ae875861ab260b80a030f50c4aff9f9dc8fff0.zip |
Adding upstream version 2.14.2.upstream/2.14.2upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '.github/workflows/authors-file.yml')
-rw-r--r-- | .github/workflows/authors-file.yml | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/.github/workflows/authors-file.yml b/.github/workflows/authors-file.yml new file mode 100644 index 0000000..3970aee --- /dev/null +++ b/.github/workflows/authors-file.yml @@ -0,0 +1,39 @@ +name: AUTHORS file + +on: + pull_request: { } + +jobs: + authors-file: + name: AUTHORS file + runs-on: ubuntu-latest + + steps: + - name: Checkout HEAD + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Check whether ./AUTHORS is up-to-date + run: | + set -exo pipefail + sort -uo AUTHORS AUTHORS + git add AUTHORS + git log --format='format:%aN <%aE>' "$( + git merge-base "origin/$GITHUB_BASE_REF" "origin/$GITHUB_HEAD_REF" + )..origin/$GITHUB_HEAD_REF" >> AUTHORS + sort -uo AUTHORS AUTHORS + git diff AUTHORS >> AUTHORS.diff + + - name: Complain if ./AUTHORS isn't up-to-date + run: | + if [ -s AUTHORS.diff ]; then + cat <<'EOF' >&2 + There are the following new authors. If the commit author data is correct, + either add them to the AUTHORS file or update .mailmap. See gitmailmap(5) or: + https://git-scm.com/docs/gitmailmap + Don't hesitate to ask us for help if necessary. + EOF + cat AUTHORS.diff + exit 1 + fi |