Skip to content

Fix latest version resolution for GitHub enterprise#131

Merged
emcfarlane merged 7 commits intomainfrom
ed/fixVEnterprise
Mar 13, 2025
Merged

Fix latest version resolution for GitHub enterprise#131
emcfarlane merged 7 commits intomainfrom
ed/fixVEnterprise

Conversation

@emcfarlane
Copy link
Copy Markdown
Collaborator

This fixes the version resolution on enterprise instances by ensuing the API call is always resolved to the public GitHub instance.

Fixes #129

@github-actions

This comment has been minimized.

src/installer.ts Outdated
github: InstanceType<typeof GitHub>,
inputs: Inputs,
): InstanceType<typeof GitHub> {
const apiUrl = process.env.GITHUB_API_URL || ``;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

there isn't some API we can call to get the URL the github object will use?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Typescript complains with: github.request.defaults.baseUrl, but I believe that would be the way to check.

@nicksnyder nicksnyder marked this pull request as ready for review March 10, 2025 16:41
Co-authored-by: Nick Snyder <nsnyder@buf.build>
Copy link
Copy Markdown
Member

@nicksnyder nicksnyder left a comment

Choose a reason for hiding this comment

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

Sounds like this works. @doriable can you do another code review since some stuff has changed

@emcfarlane emcfarlane requested a review from doriable March 11, 2025 20:29
@emcfarlane emcfarlane merged commit 128dd6b into main Mar 13, 2025
37 checks passed
@emcfarlane emcfarlane deleted the ed/fixVEnterprise branch March 13, 2025 17:21
@emcfarlane emcfarlane restored the ed/fixVEnterprise branch March 13, 2025 17:22
@emcfarlane emcfarlane mentioned this pull request Mar 14, 2025
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.

Failure to Run Buf Action on Github Enterprise

3 participants