Skip to content

Start consolodating Github REST API URLs into a central place#301

Draft
MoralCode wants to merge 13 commits intomainfrom
ntdn/consolodate_github_rest_urls1
Draft

Start consolodating Github REST API URLs into a central place#301
MoralCode wants to merge 13 commits intomainfrom
ntdn/consolodate_github_rest_urls1

Conversation

@MoralCode
Copy link
Copy Markdown
Contributor

@MoralCode MoralCode commented May 6, 2026

Description
ported from augurlabs/augur#3685 and takes inspiration from other PRs linked within that pr. This is a step towards resolving #110.

This pr:

  • refactors a few commonly reused functions that generate github API URLs (specifically for the issues, contributors, and user endpoints) so that the url building happens within the existing GithubDataAccess class.
  • creates a function that brings the fetching of github user API data into this class as well (a model for future plans for the other endpoints)
  • creates a user_endpoint_urls function that, given a username, can recreate the urls that the github API responds with. This change compliments #3747.
  • creates a currently-unused general-purpose function to generate URLs for querying Github's search API, removing the need to manually assemble the URL in an API-compliant way from clients that use it. clients just provide the query string as it would be typed into githubs search box. This change also enabled some current legacy facade code for doing these searches to be replaced with this general-purpose implementation.

Notes for Reviewers
Was tested under the prior repo and collection appears to run smoothly with this PR on my local dev instance, indicating this change doesn't cause breakage.

This depends on #306 merging first and Needs retesting due to the fork, so it is a draft

Signed commits

  • Yes, I signed my commits.

MoralCode and others added 13 commits March 16, 2026 15:05
Signed-off-by: Adrian Edwards <adredwar@redhat.com>
Signed-off-by: Adrian Edwards <adredwar@redhat.com>
Signed-off-by: Adrian Edwards <17362949+MoralCode@users.noreply.github.com>
Signed-off-by: Adrian Edwards <adredwar@redhat.com>
Signed-off-by: Adrian Edwards <adredwar@redhat.com>
Signed-off-by: Adrian Edwards <adredwar@redhat.com>
Signed-off-by: Adrian Edwards <adredwar@redhat.com>
Signed-off-by: Adrian Edwards <adredwar@redhat.com>
Signed-off-by: Adrian Edwards <adredwar@redhat.com>
Signed-off-by: Adrian Edwards <adredwar@redhat.com>
Signed-off-by: Adrian Edwards <adredwar@redhat.com>
Signed-off-by: Adrian Edwards <adredwar@redhat.com>
Signed-off-by: Adrian Edwards <adredwar@redhat.com>
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