Skip to content

Commit 34a20ea

Browse files
gep13jetersen
authored andcommitted
(nmklotasGH-96) Add Ref property to CreateReleaseRequest
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.
1 parent 94dd415 commit 34a20ea

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/GitLabApiClient/Models/Releases/Requests/CreateReleaseRequest.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,8 @@ public CreateReleaseRequest(string releaseName, string tagName, string descripti
2929
Description = description;
3030
ReleasedAt = (releasedAt == null) ? DateTime.Now : releasedAt;
3131
}
32+
33+
[JsonProperty("ref")]
34+
public string Ref { get; set; }
3235
}
3336
}

0 commit comments

Comments
 (0)