Skip to content

Add support for GitHub Pull Request entities #825

@arkid15r

Description

@arkid15r

Describe the solution you'd like

We need to track open pull requests (PRs) for repositories. To achieve this, we will:

  1. Create a PullRequest Model

    • Add a new PullRequest model under github/models/pull_request.py to reflect GitHub’s pull request structure.
    • See other similar models for better implementation.
    • Reference the GitHub API documentation for PR details: GitHub REST API - Get a Pull Request
  2. Update sync_repository to Fetch and Store PRs

    • Retrieve open PRs and store them in the database.
    • Ensure that the status of closed PRs is updated to match their current state on GitHub.
    • Use repository.get_pulls() from PyGithub to retrieve PRs.
    • Set appropriate state, sort, and direction parameters for efficient data fetching.
    • Reference PyGithub documentation: Repository.get_pulls().

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions