go-github icon indicating copy to clipboard operation
go-github copied to clipboard

Release Asset Upload URL is generated statically

Open klaernie opened this issue 3 weeks ago • 5 comments

Hi there!

I recently came across the issue, that to specify GHES one needs to both supply the core API endpoint and the upload API.

However the docs for uploading release assets state the the upload URL is specified in the Release object - so either returned while creating the release or obtainable by fetching the release.

Could the UploadRelease() be implemented in a way that it takes a RepositoryRelease instead of owner, repo and id?

This would remove the need to setup the Upload API endpoint in Client.WithEnterpriseURLs() at all.

Best regards, Andre

klaernie avatar Dec 03 '25 14:12 klaernie

I suppose we could create an alternate method to support this use case. Would you like to write a PR, @klaernie ?

gmlewis avatar Dec 03 '25 14:12 gmlewis

think I'm not at a skill level where I would attempt this. Should this change and nobody has been tempted by the problem I will give it a shot.

klaernie avatar Dec 03 '25 16:12 klaernie

This would be a great PR for any new contributor to this repo or a new Go developer. All contributions are greatly appreciated!

Feel free to volunteer for any issue and the issue can be assigned to you so that others don't attempt to duplicate the work. Also feel free to perform a code review on any PR that has the label "NeedsReview" - we appreciate those contributions too! We have a REVIEWERS file that you could add your username to if you are willing to be contacted when reviews are needed.

Please check out our CONTRIBUTING.md guide to get started. (In particular, please remember to go generate ./... and don't use force-push to your PRs.)

Thank you!

gmlewis avatar Dec 03 '25 20:12 gmlewis

Hi @gmlewis, could you please assign this issue to me? I’d like to work on it. Thanks!

rockygeekz avatar Dec 04 '25 04:12 rockygeekz

Hi @gmlewis, could you please assign this issue to me? I’d like to work on it. Thanks!

Thank you, @rockygeekz! It's yours.

gmlewis avatar Dec 04 '25 12:12 gmlewis