Skip to content

feat: add closed_at field to pull request storage#397

Closed
statxc wants to merge 2 commits intoentrius:testfrom
statxc:feat/add-closed-at-to-pull-requests
Closed

feat: add closed_at field to pull request storage#397
statxc wants to merge 2 commits intoentrius:testfrom
statxc:feat/add-closed-at-to-pull-requests

Conversation

@statxc
Copy link
Copy Markdown

@statxc statxc commented Apr 12, 2026

gh pr create --repo entrius/gittensor --base test --head statxc:feat/add-closed-at-to-pull-requests --title "feat: add closed_at field to pull request storage for 35-day window filtering" --body "$(cat <<'EOF'

Summary

  • Add closed_at field to PullRequest dataclass in classes.py
  • Extract closedAt from GraphQL response in from_graphql_response()
  • Add closed_at column to BULK_UPSERT_PULL_REQUESTS INSERT and ON CONFLICT UPDATE in queries.py
  • Add pr.closed_at to the values tuple in repository.py

Related Issues

Fixes #396

Type of Change

  • Bug fix
  • New feature
  • Refactor
  • Documentation
  • Other

Testing

  • All 272 existing tests pass
  • Ruff lint clean
  • Pyright typecheck clean (0 errors)
  • Manual verification: PullRequest.from_graphql_response() correctly parses closedAt into closed_at

Note: The pull_requests table requires an ALTER TABLE to add the closed_at column:

ALTER TABLE pull_requests ADD COLUMN IF NOT EXISTS closed_at TIMESTAMPTZ;

@statxc statxc force-pushed the feat/add-closed-at-to-pull-requests branch from dd340dd to fec29d5 Compare April 12, 2026 21:04
@anderdc anderdc closed this Apr 14, 2026
@anderdc
Copy link
Copy Markdown
Collaborator

anderdc commented Apr 14, 2026

we'll be leveraging a github mirror here soon so no need to make PRs that adjust the database for the time being

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 closed_at field to pull request storage for 35-day window filtering

2 participants