From fa0aa8cece4b717bc74d90620589021f1855aa6f Mon Sep 17 00:00:00 2001 From: William Woodruff Date: Sun, 19 Jan 2025 01:12:08 -0500 Subject: [PATCH] bugfix: collect actions from subdirectories of .github/workflows (#477) --- docs/release-notes.md | 5 +++++ src/main.rs | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/release-notes.md b/docs/release-notes.md index d53e1738..47d59a25 100644 --- a/docs/release-notes.md +++ b/docs/release-notes.md @@ -11,6 +11,11 @@ of `zizmor`. Nothing to see here (yet!) +### Bug Fixes 🐛 + +* Fixed a bug where `zizmor` would fail to discover actions within + subdirectories of `.github/workflows` (#477) + ## v1.2.2 ### Bug Fixes 🐛 diff --git a/src/main.rs b/src/main.rs index c978cea1..84749d78 100644 --- a/src/main.rs +++ b/src/main.rs @@ -202,7 +202,7 @@ fn collect_from_repo_dir( { let action = Action::from_file(entry_path, Some(top_dir))?; registry.register_input(action.into())?; - } else if entry_path.is_dir() && !entry_path.ends_with(".github/workflows") { + } else if entry_path.is_dir() { // Recurse and limit the collection mode to only actions. collect_from_repo_dir(top_dir, entry_path, &CollectionMode::ActionsOnly, registry)?; }