Skip to content

Commit 2eea28e

Browse files
committed
Update GitHub Actions workflow and review processing script to exclude processed JSON files
Modified the GitHub Actions workflow to remove the paths-ignore directive for processed reviews. Updated the review processing script to ensure that only unprocessed JSON files are considered, improving the clarity and functionality of the review system.
1 parent 965ba7b commit 2eea28e

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

.github/workflows/process_json_reviews.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ on:
55
branches: [ main ]
66
paths:
77
- 'reviews/*.json'
8-
paths-ignore:
9-
- 'reviews/processed/**'
108
workflow_dispatch: # Allow manual trigger
119

1210
permissions:

Scripts/process_json_reviews.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,8 +179,11 @@ def main() -> None:
179179
os.makedirs(REVIEWS_DIR, exist_ok=True)
180180
os.makedirs(PROCESSED_DIR, exist_ok=True)
181181

182-
# Find all JSON files in reviews directory (not in processed)
183-
json_files = list(REVIEWS_DIR.glob("*.json"))
182+
# Find all JSON files in reviews directory (exclude processed directory)
183+
json_files = [
184+
f for f in REVIEWS_DIR.glob("*.json")
185+
if f.parent.name != "processed" # Exclude files in processed subdirectory
186+
]
184187

185188
if not json_files:
186189
print("No JSON review files found in reviews/ directory")

0 commit comments

Comments
 (0)