Skip to content

Fix issue #155: Correct comment count, skip empty files, and apply formatting #162

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

youssefadly237
Copy link

This PR fixes issue #155 by:

  • Correcting the comment count to start from zero, avoiding counting 1 when no comments exist.
  • Preventing creation of empty output files if no comments are found.
  • Adding safety checks when loading JSON and parsing dates to avoid runtime errors.
  • Applying consistent code formatting for better readability and maintainability.

- Add checks to avoid passing None or empty string to json.loads

- Add guard for None before calling .timestamp() on parsed date

- Apply code formatter for consistent style
… output file

Start counting from 0 to correctly handle zero comments

Check for comments before creating output file to avoid empty files

Apply code formatting for consistency
Copy link

This PR is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added Stale and removed Stale labels Jul 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant