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

GHRelease.uploadAsset() does not work for Github Enterprise #266

Closed
lwiechec opened this issue Apr 2, 2016 · 6 comments
Closed

GHRelease.uploadAsset() does not work for Github Enterprise #266

lwiechec opened this issue Apr 2, 2016 · 6 comments
Labels

Comments

@lwiechec
Copy link

lwiechec commented Apr 2, 2016

looking at source code, the URL for uploading releases is hardcoded to Gighub.com's.

I will attempt to extend it for GitHub Enteprise, using GitHub.getApiURL()...

@oleg-nenashev
Copy link
Collaborator

Yes, it's definitely a bug

@lwiechec
Copy link
Author

lwiechec commented Apr 2, 2016

@oleg-nenashev Thanks for reply :) I was wondering what would be the good course of action; after reading the release upload API docs, I think we need first to 'ask' for the upload URL (via calling GitHub's API /repos/{user}/{repo}/releases/{id} for upload_url and then use it. Would you think it's correct?

lwiechec added a commit to lwiechec/github-api that referenced this issue Apr 3, 2016
I am not sure if it is possible to 'ask' the GitHub API for the default
upload URL; that would be great but if not, we need to pass it somehow.

refs hub4j#266
@lwiechec
Copy link
Author

lwiechec commented Apr 4, 2016

Hi, I have created a very simple fix, adding another version of uploadAsset() that accepts the upload URL.

lwiechec added a commit to lwiechec/github-api that referenced this issue Apr 4, 2016
lwiechec added a commit to lwiechec/github-api that referenced this issue Apr 5, 2016
lwiechec added a commit to lwiechec/github-api that referenced this issue Apr 6, 2016
using commons-lang's defaultIfNull; also updating javadoc

refs hub4j#266
@kohsuke
Copy link
Collaborator

kohsuke commented Jun 4, 2016

Please see my comment to PR #267

lwiechec added a commit to lwiechec/github-api that referenced this issue Jun 21, 2016
the field contains the URL to use to upload the assets. It is formatted
in a better way.

refs hub4j#266
lwiechec added a commit to lwiechec/github-api that referenced this issue Jun 21, 2016
@mpern
Copy link

mpern commented Jan 7, 2019

I just stumbled across this issue, you can not upload assets to Github Enterprise

@bitwiseman
Copy link
Member

I believe this is fixed.

@mpern @lwiechec if you can reproduce, please comment with how steps to reproduce.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants