Skip to content

Comments

Split github.rs file into multiple smaller sub-modules#2298

Open
Urgau wants to merge 4 commits intorust-lang:masterfrom
Urgau:split-github-module
Open

Split github.rs file into multiple smaller sub-modules#2298
Urgau wants to merge 4 commits intorust-lang:masterfrom
Urgau:split-github-module

Conversation

@Urgau
Copy link
Member

@Urgau Urgau commented Feb 21, 2026

Our github.rs file, where all of our models and calls to GitHub APIs lives has grown organically over time without any sense of logic or order.

It currently sits at more than 3500 lines longs.

This PR split it into more manageable sub-modules:

  • client.rs: for GithubClient
  • event.rs: models for the webhooks
  • issue.rs: model and API call regarding Issue
  • issue_query.rs: everything related to IssuesQuery trait
  • issue_repository.rs: model and API call regarding IssueRepository
  • repos.rs: mainly API calls for GitHub's /repos endpoint
    • repos/issue_with_comments.rs: models and API call for our `/gh-comments/ endpoint
    • repos/issue_with_comments.rs: models and API call for our `/gh-comments/ endpoint
  • repository.rs: model and API call regarding Repository
  • utils.rs: some utils methods and models

github.rs now only contains some reexport.

@Urgau Urgau requested a review from Kobzol February 21, 2026 16:40
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