Add repository filters#4
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0121d8f60a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| return None | ||
| if len(value) == 10: | ||
| return datetime.fromisoformat(value).replace(tzinfo=timezone.utc) | ||
| return datetime.fromisoformat(value.replace("Z", "+00:00")) |
There was a problem hiding this comment.
Normalize or reject timestamp cutoffs
When --pushed-after is passed as an ISO timestamp without a timezone (for example 2026-01-01T00:00:00), the validation in main() accepts it because parse_date() succeeds, but this branch returns a naive datetime; later repo_passes_filters() compares it with GitHub's timezone-aware pushed_at value and raises TypeError, which is not caught. Either enforce the documented YYYY-MM-DD shape or attach UTC consistently for all accepted cutoff values.
Useful? React with 👍 / 👎.
Summary
Adds repository-level filters to make opportunity scans more focused:
--min-stars--exclude-archived--exclude-forks--pushed-after YYYY-MM-DDThe ranking now keeps a small repository metadata object per repo instead of only stars, so filters can be applied before output.
Fixes #1
Verification
python3 -m pytest -q python3 -m py_compile src/hubsignal/cli.py tests/test_cli.py hubsignal --help PYTHONPATH=src python3 -m hubsignal --query "is:issue is:open label:\"good first issue\" language:Python -label:claimed" --limit 3 --min-stars 1 --exclude-archived --exclude-forks --pushed-after 2026-01-01Results: