Fix scan action to allow linter updates to PRs (#730)
Co-authored-by: UltralyticsAssistant <[email protected]>
This commit is contained in:
co-authored by
UltralyticsAssistant
parent
652b860a42
commit
c512f24b6e
+7
-3
@@ -185,10 +185,14 @@ def run():
|
||||
|
||||
merged = 0
|
||||
for pr in json.loads(pr_list.stdout):
|
||||
# Filter by title: must be a GitHub Actions bump PR
|
||||
title = pr.get("title", "").lower()
|
||||
if "bump" not in title or "/.github/workflows" not in title:
|
||||
continue
|
||||
|
||||
# Require at least one workflow/action file
|
||||
paths = [f["path"] for f in (pr.get("files") or [])]
|
||||
if not paths or not all(
|
||||
p.startswith(".github/workflows/") or p.endswith(("action.yml", "action.yaml")) for p in paths
|
||||
):
|
||||
if not any(p.startswith(".github/workflows/") or p.endswith(("action.yml", "action.yaml")) for p in paths):
|
||||
print(" ⏭️ Skipped (non-action files)")
|
||||
continue
|
||||
|
||||
|
||||
Reference in New Issue
Block a user