xanzy / go-gitlab

GitLab Go SDK
Apache License 2.0
2.37k stars 940 forks source link

API Broken with the update from v0.94.0 to v0.95.0 #1852

Closed zbindenren closed 9 months ago

zbindenren commented 9 months ago

Hi

In the Update MergeRequestOptions struct the AssigneeID got changed to LabelOptions instead of an int:

type UpdateMergeRequestOptions struct {
...
    AssigneeID         *LabelOptions `url:"assignee_id,omitempty" json:"assignee_id,omitempty"`
...
}

Is this intentional? If I check the api specification it is described as integer: https://docs.gitlab.com/ee/api/merge_requests.html#update-mr

assignee_id integer No  The ID of the user to assign the merge request to. Set to 0 or provide an empty value to unassign all assignees.

If this is intentional, then the usage of the API is a little cumbersome now. I have to get the id of the user, then convert it to a list of strings with one entry.

svanharmelen commented 9 months ago

No somethings has gone wrong with that PR. I will fix it in the coming hour and make a new release...

svanharmelen commented 9 months ago

Fixed in v0.95.1