Commit f7652c7f authored by Brad King's avatar Brad King 💬
Browse files

Merge branch 'fix_mr_type' into release-11.9


 Make MergeRequest.user field optional
Acked-by: Kitware Robot's avatarKitware Robot <>
Merge-request: !145
parents a98fdad5 a2899a74
......@@ -396,7 +396,7 @@ fn test_read_merge_request() {
assert_eq!(merge_request.discussion_locked, None);
assert_eq!(merge_request.should_remove_source_branch, None);
assert_eq!(merge_request.force_remove_source_branch, Some(true));
assert_eq!(merge_request.user.can_merge, true);
assert_eq!(merge_request.user.unwrap().can_merge, true);
......@@ -1695,7 +1695,7 @@ pub struct MergeRequest {
/// Whether the merge request should be deleted or not (set by the author).
pub force_remove_source_branch: Option<bool>,
/// Information about current user's access to the merge request.
pub user: MergeRequestUser,
pub user: Option<MergeRequestUser>,
/// The URL of the merge request.
pub web_url: String,
......@@ -1840,7 +1840,7 @@ impl From<MergeRequestChanges> for MergeRequest {
discussion_locked: mr.discussion_locked,
should_remove_source_branch: mr.should_remove_source_branch,
force_remove_source_branch: mr.force_remove_source_branch,
user: mr.user,
user: Some(mr.user),
web_url: mr.web_url,
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment