// MRAssign assigns the given MR to the given user, and updates the value of MR
MRAssign assigns the given MR to the given user, and updates the value of MR
// MRAssign assigns the given MR to the given user and updates the value of MR
func MRAssign(mr *gitlab.MergeRequest, userID int) error {
	for _, user := range mr.Assignees {
		if user.ID == userID {
			return nil
		}
	}
	_mr, _, err := lab.MergeRequests.UpdateMergeRequest(mr.ProjectID, mr.ID, &gitlab.UpdateMergeRequestOptions{
		AssigneeIDs: []int{userID},
	})
	if err != nil {
		return err
	}
	mr = _mr
	return nil
}
func MRAssign ( mr * gitlab . MergeRequest , userID int ) error { for _ , user := range mr . Assignees { if user . ID == userID { return nil } } _mr , _ , err := lab . MergeRequests . UpdateMergeRequest ( mr . ProjectID , mr . ID , & gitlab . UpdateMergeRequestOptions { AssigneeIDs : [ ] int { userID } , } ) if err != nil { return err } mr = _mr return nil }
MRAssign assigns the given MR to the given user, and updates the value of MR
MRAssign assigns the given MR to the given user and updates the value of MR