Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace comment by just a failure #6943

Merged
merged 1 commit into from
Sep 24, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 11 additions & 14 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ jobs:
with:
# full checkout needed for authors generation
fetch-depth: 0
- name: "Check AUTHORS"
- name: "All authors of this PR listed in AUTHORS"
id: authors_check
shell: bash
run: |
Expand All @@ -245,19 +245,16 @@ jobs:
set +o pipefail
added=$(git diff HEAD --no-ext-diff --unified=0 -a --no-prefix | egrep "^\+[^+]" | sed "s/^\+//")
if [ -z "$added" ]; then
echo "::set-output name=newauthor::false"
echo "No authors added"
exit 0
fi
message="The JabRef maintainers will add the following name to the [AUTHORS file](https://github.com/JabRef/jabref/blob/master/CONTRIBUTING.md#author-credits). In case you want to use a different one, please comment here and [adjust your name in your git configuration](https://docs.github.com/en/github/using-git/setting-your-username-in-git) for future commits.%0A%0A\`\`\`%0A${added//$'\n'/'%0A'}%0A\`\`\`%0A"
echo "::set-output name=message::$message"
echo "::set-output name=newauthor::true"
echo "New authors found"
- name: Comment PR
uses: unsplash/comment-on-pr@master
if: steps.authors_check.outputs.newauthor == 'true'
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN_COMMENT_ON_PR }}
with:
msg: "${{ steps.authors_check.outputs.message }}"
check_for_duplicate_msg: true
echo "Authors found in this PR not listed in the AUTHORS file."
echo
echo "The JabRef maintainers will add the following name to the AUTHORS file"
echo
echo -e "$added"
echo
echo "In case you want to use a different one, please comment here and adjust your name in your git configuration for future commits"
echo
echo "Background: Information about the AUTHORS file can be found at https://github.com/JabRef/jabref/blob/master/CONTRIBUTING.md#author-credits"
exit 1