Skip to content

Commit fa46576

Browse files
committed
Skip dependabot commits in validation
1 parent 56fff4a commit fa46576

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

.github/workflows/reject_github_commits.yaml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,16 @@ jobs:
1919
- name: Ensure no commits are signed by GitHub
2020
shell: bash {0}
2121
run: |
22+
dependabot=($(git rev-list --no-merges --author="dependabot" origin/${{ github.base_ref }}..${{ github.sha }}))
23+
2224
git rev-list --no-merges origin/${{ github.base_ref }}..${{ github.sha }} | while read -r commit; do
2325
echo "checking $commit"
26+
if printf "%s\n" "${dependabot[@]}" | grep -qxF -- "$commit"; then
27+
echo "skipping dependabot commit
28+
continue
29+
fi
30+
2431
if (git verify-commit -v --raw $commit || true) 2>&1 | grep -q B5690EEEBB952194; then
25-
echo "Please squash GitHub commit $commit into the respective change."; exit 1;
32+
echo "Please squash GitHub commit $commit into the respective change."; exit 1;
2633
fi
2734
done

0 commit comments

Comments
 (0)