Skip to content

Commit

Permalink
fix workflow counter
Browse files Browse the repository at this point in the history
  • Loading branch information
SkafteNicki committed Jan 15, 2025
1 parent 84c7680 commit 68248b2
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tools/repo_stats/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,13 @@ def num_python_files(self) -> int:
@property
def num_workflow_files(self) -> int:
"""Returns the number of workflow files in the repository."""
return len([f for f in self.file_tree if ".yml" in f["path"]])
return len(
[
f
for f in self.file_tree
if f["path"].startswith(".github/workflows/") and f["path"].endswith((".yml", ".yaml"))
]
)

@property
def has_requirements_file(self) -> bool:
Expand Down

0 comments on commit 68248b2

Please sign in to comment.