FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Check for images added-and-modified in a same PR by anntzer · Pull Request #21593 · matplotlib/matplotlib · GitHub

Repository navigation

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .yml  (1) All 1 file type selected
Only manifest files
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
12 changes: 11 additions & 1 deletion .github/workflows/clean_pr.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,14 @@ jobs:
printf 'The following files were both added and deleted in this PR:\n%s\n' "$ad"
exit 1
fi

- name: Check for added-and-modified images
run: |
git fetch --quiet origin "$GITHUB_BASE_REF"
Comment thread
QuLogic marked this conversation as resolved.
base="$(git merge-base "origin/$GITHUB_BASE_REF" 'HEAD^2')"
am="$(git log "$base..HEAD^2" --pretty=tformat: --name-status --diff-filter=AM |
cut --fields 2 | sort | uniq --repeated |
grep -E '.(png|pdf|ps|eps|svg)' || true)"
if [[ -n "$am" ]]; then
printf 'The following images were both added and modified in this PR:\n%s\n' "$am"
exit 1
fi

Back | FazBrowse Home | New Git URL