mirror of
https://github.com/The-Pocket/PocketFlow-Tutorial-Codebase-Knowledge.git
synced 2026-08-29 16:40:32 +08:00
update the crawl
This commit is contained in:
+1
-1
@@ -23,7 +23,7 @@ author:
|
||||
|
||||
# Mermaid settings
|
||||
mermaid:
|
||||
version: "10.9.3" # Pick the version you want
|
||||
version: "11.6.0" # Pick the version you want
|
||||
# Default configuration
|
||||
config: |
|
||||
directionLR
|
||||
|
||||
@@ -155,23 +155,6 @@ def crawl_github_files(
|
||||
files = {}
|
||||
skipped_files = []
|
||||
|
||||
def should_include_file(file_path: str, file_name: str) -> bool:
|
||||
"""Determine if a file should be included based on patterns"""
|
||||
# If no include patterns are specified, include all files
|
||||
if not include_patterns:
|
||||
include_file = True
|
||||
else:
|
||||
# Check if file matches any include pattern
|
||||
include_file = any(fnmatch.fnmatch(file_name, pattern) for pattern in include_patterns)
|
||||
|
||||
# If exclude patterns are specified, check if file should be excluded
|
||||
if exclude_patterns and include_file:
|
||||
# Exclude if file matches any exclude pattern
|
||||
exclude_file = any(fnmatch.fnmatch(file_path, pattern) for pattern in exclude_patterns)
|
||||
return not exclude_file
|
||||
|
||||
return include_file
|
||||
|
||||
def fetch_contents(path):
|
||||
"""Fetch contents of the repository at a specific path and commit"""
|
||||
url = f"https://api.github.com/repos/{owner}/{repo}/contents/{path}"
|
||||
|
||||
Reference in New Issue
Block a user