Skip to content

Commit

Permalink
copied .github/workflows/sheldon.yaml from styles
Browse files Browse the repository at this point in the history
  • Loading branch information
csl-bot committed Oct 16, 2024
1 parent 8bc2af1 commit 74cfe32
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion .github/workflows/sheldon.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,13 @@ jobs:
bundle config path vendor/bundle
bundle update sheldon --jobs 4 --retry 3
- name: Check if the user is a contributor
run: |
contributors=$(curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" "https://api.github.com/repos/${{ github.repository }}/contributors" | jq -r '.[].login')
if echo "$contributors" | grep -q "${{ github.event.sender.login }}"; then
echo "contributor=--contributor" >> $GITHUB_ENV
fi
- name: Welcome to a new PR
if: github.event.action == 'opened' && steps.changed.outputs.style == 'true'
run: bundle exec sheldon --token=$GITHUB_TOKEN --welcome
Expand All @@ -79,7 +86,7 @@ jobs:

- name: report
if: (failure() || success()) && steps.changed.outputs.style == 'true'
run: bundle exec sheldon --token=$GITHUB_TOKEN --${{ job.status }} --verbose
run: bundle exec sheldon --token=$GITHUB_TOKEN --${{ job.status }} --verbose ${{ env.contributor }}

- name: commit reindented styles
if: github.repository == 'citation-style-language/styles' && steps.changed.outputs.style == 'true'
Expand Down

0 comments on commit 74cfe32

Please sign in to comment.