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
approval state of merge requests #766
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two small comments, but should be easy to update after which this PR can be merged 👍
ContainsHiddenGroups bool `json:"contains_hidden_groups"` | ||
ApprovedBy []*BasicUser `json:"approved_by"` | ||
Approved bool `json:"approved"` | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's not create a new struct, but instead add the missing fields to the MergeRequestApprovalRule
struct and reuse that one here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
merge_request_approvals.go
Outdated
return nil, nil, err | ||
} | ||
|
||
var par *MergeRequestApprovalState |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe call this pas
, for this is about the state, not a rule?
var par *MergeRequestApprovalState | |
var pas *MergeRequestApprovalState |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
I addressed both comments. Let me know if you want any other changes. Thanks |
Thanks for doing this. I made an ugly vendor patch downstream but didnt have time to merge back |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! Thanks @granular-ryanbonham!
Adds Support for getting the approval state of merge requests
https://docs.gitlab.com/ee/api/merge_request_approvals.html#get-the-approval-state-of-merge-requests