Skip to content

Commit

Permalink
Fix placement of xargs pipe
Browse files Browse the repository at this point in the history
  • Loading branch information
queengooborg committed Jul 29, 2023
1 parent c7293b9 commit bba4fee
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/reviewdog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ jobs:
run: |
# Use the GitHub API to get the list of changed files
# documenation: https://docs.github.com/rest/commits/commits#compare-two-commits
DIFF_DOCUMENTS=$(gh api repos/{owner}/{repo}/compare/${{ env.BASE_SHA }}...${{ env.HEAD_SHA }} \
--jq '.files | .[] | select(.status|IN("added", "modified", "renamed", "copied", "changed")) | .filename') | xargs
DIFF_DOCUMENTS=$(gh api repos/{owner}/{repo}/compare/${{ env.BASE_SHA }}...${{ env.HEAD_SHA }} --jq '.files | .[] | select(.status|IN("added", "modified", "renamed", "copied", "changed")) | .filename' | xargs)
echo "DIFF_DOCUMENTS=${DIFF_DOCUMENTS}" >> $GITHUB_ENV
- name: Setup Node.js environment
Expand All @@ -37,7 +36,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Perform linting
run: yarn prettier --ignore-unknown --write "${{ env.DIFF_DOCUMENTS }}"
run: yarn prettier --ignore-unknown --write ${{ env.DIFF_DOCUMENTS }}

- name: Submit suggestion
uses: reviewdog/action-suggester@v1
Expand Down

0 comments on commit bba4fee

Please sign in to comment.