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

POST /api/v1/releases should require target parameter #5471

Closed
1 of 3 tasks
noerw opened this issue Dec 4, 2018 · 6 comments · Fixed by #5870
Closed
1 of 3 tasks

POST /api/v1/releases should require target parameter #5471

noerw opened this issue Dec 4, 2018 · 6 comments · Fixed by #5870
Labels
Milestone

Comments

@noerw
Copy link
Member

noerw commented Dec 4, 2018

  • Gitea version (or commit ref): 1.6.0

  • Can you reproduce the bug at https://try.gitea.io:

    • Yes (provide example URL)
    • No
    • Not relevant

Description

When trying to create a release without target_comitish parameter the following error occurs:

GetCommit: exit status 128 - fatal: ambiguous argument '': unknown revision or path not in the working tree.

It would be good to reject this request, instead of querying git with an empty commitish string.

@techknowlogick
Copy link
Member

@noerw thanks for your PR to the go-sdk repo, are you able to make another one to this repo to update the dep? 😄

@noerw
Copy link
Member Author

noerw commented Dec 4, 2018

I quickly searched for the API code but did not find it, so I guess, no?

@techknowlogick
Copy link
Member

iirc it's just dep ensure -update code.gitea.io/sdk in a new branch. If you want me to poke around at it instead just let me know.

@noerw
Copy link
Member Author

noerw commented Dec 4, 2018

@techknowlogick I dont have a dep binary and dont know what it is, so I guess it'd be best if you did it ;)
Thanks!

@techknowlogick
Copy link
Member

@noerw np. I can do that, and I will also write up the steps that I do so that you can know what they are if you want to in the future.

Dep is a golang dependancy tool, and it allows us to manage dependencies (such as go-sdk which we import from the other repo). You'll see gopkg.toml (and a lock file) which lists all the deps we have, and the vendor directory which is a copy of all the dependancies that we use.

@techknowlogick
Copy link
Member

@noerw if you are interested in the steps I took I documented them in the PR linked to this issue. If you want to install dep first, you can run curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh

@jonasfranz jonasfranz added this to the 1.7.0 milestone Jan 1, 2019
@techknowlogick techknowlogick modified the milestones: 1.7.0, 1.8.0 Jan 5, 2019
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
4 participants