Skip to content

Add repository filters#4

Merged
Photon101 merged 1 commit into
mainfrom
repo-filters
May 11, 2026
Merged

Add repository filters#4
Photon101 merged 1 commit into
mainfrom
repo-filters

Conversation

@Photon101

Copy link
Copy Markdown
Owner

Summary

Adds repository-level filters to make opportunity scans more focused:

  • --min-stars
  • --exclude-archived
  • --exclude-forks
  • --pushed-after YYYY-MM-DD

The 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-01

Results:

5 passed in 0.04s

@Photon101 Photon101 merged commit 53b9a9b into main May 11, 2026
2 checks passed
@Photon101 Photon101 deleted the repo-filters branch May 11, 2026 00:48

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread src/hubsignal/cli.py
return None
if len(value) == 10:
return datetime.fromisoformat(value).replace(tzinfo=timezone.utc)
return datetime.fromisoformat(value.replace("Z", "+00:00"))

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

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.

Add repository-level filters

1 participant