diff --git a/.github/workflows/approve-dependabot-pr.yml b/.github/workflows/approve-dependabot-pr.yml index e05156e..05e0ea2 100644 --- a/.github/workflows/approve-dependabot-pr.yml +++ b/.github/workflows/approve-dependabot-pr.yml @@ -56,9 +56,8 @@ jobs: offenders=$(gh api "repos/$GH_REPO/pulls/$PR_NUMBER/commits" --paginate \ --jq '[.[] | select( (.author.login // "") != "dependabot[bot]" or - (.committer.login // "") != "dependabot[bot]" or (.commit.author.name // "") != "dependabot[bot]" or - (.commit.committer.name // "") != "dependabot[bot]" + ((.commit.author.email // "") | contains("dependabot[bot]") | not) ) | .sha] | .[]') if [[ -n "$offenders" ]]; then echo "Refusing to auto-merge: found commits not created by dependabot[bot]:"