Skip to content

fix: ensure baseUrl is not already prefixed (#2616) #2620

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

frco9
Copy link

@frco9 frco9 commented Apr 10, 2025

Resolves #2616


Before the change?

  • For self-hosted github (i.e with host different than https://api.github.com/) in the NewRESTClient func the api/v3/ suffix is automatically added. However in the getInstallationAccessToken the same check is done. This results in have a double suffix and thus break the api call

After the change?

  • Not add the suffix if it is already added

Pull request checklist

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been reviewed and added / updated if needed (for bug fixes / features)

Does this introduce a breaking change?

Please see our docs on breaking changes to help!

  • Yes
  • No

For self-hosted github (i.e with host different than https://api.github.com/) in the NewRESTClient func the "api/v3/" suffix is automatically added.
However in the `getInstallationAccessToken` the same check is done. This results in have a double suffix.
This fix ensure it is not added if already existing
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.

[BUG]: data_source_github_app_token.go wrong baseURL for self-hosted Github Entreprise
1 participant