Skip to content

feat: Add support for setting client URLs#4240

Merged
gmlewis merged 3 commits into
google:masterfrom
stevehipwell:add-with-urls
May 21, 2026
Merged

feat: Add support for setting client URLs#4240
gmlewis merged 3 commits into
google:masterfrom
stevehipwell:add-with-urls

Conversation

@stevehipwell
Copy link
Copy Markdown
Contributor

This PR adds support for setting the URLs without making changes to the path prefix as happens when using github.WithEnterpriseURLs. This function is useful when mocking the GitHub API as without it all test servers need modifying to add the GHAS prefix.

@gmlewis sorry but this might be worthy of a patch release, I discovered my oversight when I was wiring the new version up in the TF provider and while I was able to get the tests working I needed to modify the paths.

Signed-off-by: Steve Hipwell <steve.hipwell@gmail.com>
@gmlewis gmlewis changed the title feat: add support for setting client urls feat: Add support for setting client URLs May 19, 2026
Comment thread github/github.go Outdated
@codecov
Copy link
Copy Markdown

codecov Bot commented May 19, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.46%. Comparing base (5475166) to head (37edab9).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #4240   +/-   ##
=======================================
  Coverage   97.45%   97.46%           
=======================================
  Files         189      190    +1     
  Lines       19164    19178   +14     
=======================================
+ Hits        18677    18691   +14     
  Misses        270      270           
  Partials      217      217           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment thread github/github_test.go
Copy link
Copy Markdown
Collaborator

@gmlewis gmlewis left a comment

Choose a reason for hiding this comment

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

LGTM.
Awaiting second LGTM+Approval from any other contributor to the repo before merging.

cc: @alexandear - @zyfy29 - @Not-Dhananjay-Mishra - @munlicode

@gmlewis gmlewis added the NeedsReview PR is awaiting a review before merging. label May 20, 2026
Copy link
Copy Markdown
Contributor

@munlicode munlicode left a comment

Choose a reason for hiding this comment

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

LGTM

@gmlewis gmlewis removed the NeedsReview PR is awaiting a review before merging. label May 21, 2026
@gmlewis
Copy link
Copy Markdown
Collaborator

gmlewis commented May 21, 2026

Thank you, @munlicode!
Merging.

@gmlewis gmlewis merged commit 69fa364 into google:master May 21, 2026
10 checks passed
@stevehipwell stevehipwell deleted the add-with-urls branch May 21, 2026 05:04
@stevehipwell
Copy link
Copy Markdown
Contributor Author

@gmlewis would it be possible to get a patch out for this?

@gmlewis
Copy link
Copy Markdown
Collaborator

gmlewis commented May 21, 2026

@gmlewis would it be possible to get a patch out for this?

I may be able to do one this weekend.

@gmlewis
Copy link
Copy Markdown
Collaborator

gmlewis commented May 21, 2026

@gmlewis would it be possible to get a patch out for this?

I may be able to do one this weekend.

@stevehipwell - this is now available here:
https://github.com/google/go-github/releases/tag/v88.0.0

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.

3 participants