mirror of
https://github.com/sindresorhus/awesome.git
synced 2026-06-30 18:40:34 +02:00
Fix: Prevent repo linter from crashing on deletion-only PRs (#4283)
This commit is contained in:
committed by
GitHub
parent
ad02f86dc4
commit
e8a4efeb13
@@ -5,9 +5,9 @@ set -eo pipefail
|
|||||||
REPO_TO_LINT=$(
|
REPO_TO_LINT=$(
|
||||||
git diff origin/main -- readme.md |
|
git diff origin/main -- readme.md |
|
||||||
# Look for changes (indicated by lines starting with +).
|
# Look for changes (indicated by lines starting with +).
|
||||||
grep ^+ |
|
(grep ^+ || true) |
|
||||||
# Get the line that includes the readme.
|
# Get the line that includes the readme.
|
||||||
grep -Eo 'https.*#readme' |
|
(grep -Eo 'https.*#readme' || true) |
|
||||||
# Get just the URL.
|
# Get just the URL.
|
||||||
sed 's/#readme//')
|
sed 's/#readme//')
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user