Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 95463c3 commit 0bdbf04Copy full SHA for 0bdbf04
.github/workflows/clean_pr.yml
@@ -19,4 +19,14 @@ jobs:
19
printf 'The following files were both added and deleted in this PR:\n%s\n' "$ad"
20
exit 1
21
fi
22
-
+ - name: Check for added-and-modified images
23
+ run: |
24
+ git fetch --quiet origin "$GITHUB_BASE_REF"
25
+ base="$(git merge-base "origin/$GITHUB_BASE_REF" 'HEAD^2')"
26
+ am="$(git log "$base..HEAD^2" --pretty=tformat: --name-status --diff-filter=AM |
27
+ cut --fields 2 | sort | uniq --repeated |
28
+ grep -E '.(png|pdf|ps|eps|svg)')"
29
+ if [[ -n "$am" ]]; then
30
+ printf 'The following images were both added and modified in this PR:\n%s\n' "$ad"
31
+ exit 1
32
+ fi
0 commit comments