Start consolodating Github REST API URLs into a central place#3685
Open
Start consolodating Github REST API URLs into a central place#3685
Conversation
Signed-off-by: Adrian Edwards <adredwar@redhat.com>
Signed-off-by: Adrian Edwards <adredwar@redhat.com>
1 task
shlokgilda
requested changes
Feb 13, 2026
Collaborator
shlokgilda
left a comment
There was a problem hiding this comment.
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.
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>
Member
|
Needs to be tested before merge. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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