Skip to content
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

AEP: implement github client for enterprise github domains #38

Open
alex60217101990 opened this issue May 3, 2024 · 2 comments
Open

Comments

@alex60217101990
Copy link

alex60217101990 commented May 3, 2024

I want to use your github action: https://github.com/wangyoucao577/go-release-action but when calling the utility: https://github.com/wangyoucao577/go-release-action/blob/ec68290905b5e90fcab97069f9546af4303dd91a/release.sh #L190 I get an error. After debugging, I found in your code:

client := github.NewClient(tc)
you only use a regular client, without the ability to use: https://github.com/google/go-github/blob/v17.0.0/github/github.go#L272. Can you please make the utility and github action more universal so that you can redefine api.github.com to the desired one ?

@wangyoucao577
Copy link
Owner

Actually the github-assets-uploader tool will use WithEnterpriseURLs when -baseurl is set.
see

client := github.NewClient(tc)
if baseUrl != "" {
client, _ = client.WithEnterpriseURLs(baseUrl, baseUrl)
}

However, the go-release-action doesn't support it yet since I don't have enviornment to test it.
Here's some idea that how to enable the feature on go-release-action wangyoucao577/go-release-action#165. It will be helpful if you can test it, PR is welcome once it's ok.

@wangyoucao577
Copy link
Owner

@alex60217101990 Would you please have a try with wangyoucao577/go-release-action@feature/baseurl? Since I don't have enterprise environment to test it.

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

No branches or pull requests

2 participants