Skip to content

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

Open
MoralCode wants to merge 5 commits intomainfrom
ntdn/consolodate_github_rest_urls1
Open

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

Conversation

@MoralCode
Copy link
Contributor

Description
This takes inspiration from the discussion in #3597 and is a step towards resolving #3277

This pr starts small and refactors a few commonly reused endpoints (specifically for the issues endpoint) so that they are instead fetched from a central place within an existing github api helper class. This sets things up to enable the potential future swapping out of the domain name in the base URL and having that change apply broadly.

Notes for Reviewers
no testing done just yet. The change is relatively trivial
Signed commits

  • Yes, I signed my commits.

Signed-off-by: Adrian Edwards <adredwar@redhat.com>
Signed-off-by: Adrian Edwards <adredwar@redhat.com>
Copy link
Collaborator

@shlokgilda shlokgilda left a comment

Choose a reason for hiding this comment

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

Like the idea.

One thing that needs fixing before merge: there's an operator precedence bug in issues_endpoint_url that'll break the trailing_slash=False path. Python evaluates the ternary after the +, so when trailing_slash=False you get an empty string back instead of the URL without a slash. The issues endpoint actually hits this path, so it'd break issue collection.

Also, _base_url() is defined but never called. issues_endpoint_url still hardcodes the domain. Worth wiring that in since that's the whole point of the refactor.

Details in the inline comments.

MoralCode and others added 3 commits February 13, 2026 09:03
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>
Copy link
Collaborator

@shlokgilda shlokgilda left a comment

Choose a reason for hiding this comment

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

LGTM

@sgoggins
Copy link
Member

Needs to be tested before merge.

@MoralCode MoralCode added the testing Related to Augur's testing suite label Feb 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

testing Related to Augur's testing suite

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants