Skip to content

Commit

Permalink
chore: fix dependabot author check
Browse files Browse the repository at this point in the history
Apparently GH actions scripts run with set -e, so the search miss on
this grep was causing the entire action to fail.

Signed-off-by: Will Murphy <will.murphy@anchore.com>
  • Loading branch information
willmurphyscode committed Dec 18, 2023
1 parent 2e15d72 commit faf8827
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/dependabot-auto-merge.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Check whether anyone besides dependabot has pushed
id: pr_author
run: |
EXTRA_AUTHORS=$(gh pr view "$PR_URL" --json commits --jq '.commits[] | .authors[] | .login' | sort | uniq | grep -v dependabot)
EXTRA_AUTHORS=$(gh pr view "$PR_URL" --json commits --jq '.commits[] | .authors[] | .login' | sort | uniq | grep -v dependabot || echo -n '')
if [ -n "$EXTRA_AUTHORS" ]; then
echo "PR has authors in addition to dependabot: $EXTRA_AUTHORS"
echo "human_pushed=true" >> "$GITHUB_OUTPUT"
Expand Down

0 comments on commit faf8827

Please sign in to comment.