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

Issue when creating Release through API #96

Closed
gep13 opened this issue Dec 10, 2019 · 3 comments · Fixed by #98
Closed

Issue when creating Release through API #96

gep13 opened this issue Dec 10, 2019 · 3 comments · Fixed by #98

Comments

@gep13
Copy link
Contributor

gep13 commented Dec 10, 2019

I have just attempted to create a GitLab Release through the API when the tag doesn't currently exist on the Repository. When I did this, I got the following response in Fiddler:

image

Looking at the documentation, it suggests that when the tag doesn't exist, I can specify a Ref to point to:

https://docs.gitlab.com/ee/api/releases/#create-a-release

image

However, I don't see anywhere in the CreateReleaseRequest class that maps to the Ref parameter.

Does this exist somewhere? Or is this something that needs to be added to the GitLabApiClient?

@jetersen
Copy link
Collaborator

jetersen commented Dec 11, 2019

I believe this is something that was not added to the library.

@gep13
Copy link
Contributor Author

gep13 commented Dec 11, 2019

@Casz I only started using this library yesterday, and I haven't started digging into the code yet. Having the ability to set the Ref property is something that I would like to see added to the library. Can you please give me some pointers on what code needs to be added, and I would be happy to submit a PR to get it added. Thanks.

@jetersen
Copy link
Collaborator

https://github.com/nmklotas/GitLabApiClient/blob/master/src/GitLabApiClient/Models/Releases/Requests/CreateReleaseRequest.cs seems to only consider one use case so it will properly need to be modified

gep13 added a commit to gep13/GitLabApiClient that referenced this issue Dec 11, 2019
As documented here:

https://docs.gitlab.com/ee/api/releases/#create-a-release

When creating a GitLab release, there is additional property called `Ref` which is used when the Tag that the Release is targeting doesn't exist yet.  This Ref can be a SHA for a commit, another tag, or a branch name.  In the testing that I have done, the tag_name property is still required, so I don't think we need to create any additional constructors, only have the ability to set the `Ref` property when required.
gep13 added a commit to gep13/GitLabApiClient that referenced this issue Dec 12, 2019
As documented here:

https://docs.gitlab.com/ee/api/releases/#create-a-release

When creating a GitLab release, there is additional property called `Ref` which is used when the Tag that the Release is targeting doesn't exist yet.  This Ref can be a SHA for a commit, another tag, or a branch name.  In the testing that I have done, the tag_name property is still required, so I don't think we need to create any additional constructors, only have the ability to set the `Ref` property when required.
jetersen pushed a commit that referenced this issue Dec 14, 2019
As documented here:

https://docs.gitlab.com/ee/api/releases/#create-a-release

When creating a GitLab release, there is additional property called `Ref` which is used when the Tag that the Release is targeting doesn't exist yet.  This Ref can be a SHA for a commit, another tag, or a branch name.  In the testing that I have done, the tag_name property is still required, so I don't think we need to create any additional constructors, only have the ability to set the `Ref` property when required.
MindaugasLaganeckas pushed a commit to MindaugasLaganeckas/GitLabApiClient that referenced this issue Mar 9, 2021
As documented here:

https://docs.gitlab.com/ee/api/releases/#create-a-release

When creating a GitLab release, there is additional property called `Ref` which is used when the Tag that the Release is targeting doesn't exist yet.  This Ref can be a SHA for a commit, another tag, or a branch name.  In the testing that I have done, the tag_name property is still required, so I don't think we need to create any additional constructors, only have the ability to set the `Ref` property when required.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants