An update will be applied January 25th, between 12PM and 1:00PM EST (UTC -5:00). The site may be slow during that time.

Commit bb347e7c authored by Ben Boeckel's avatar Ben Boeckel
Browse files

types: diff_refs can be null

parent 7d5628cb
......@@ -295,11 +295,11 @@ fn test_read_merge_request() {
assert_eq!(merge_request.merge_status, MergeStatus::CanBeMerged);
assert_eq!(merge_request.sha,
Some(ObjectId::new("04e94ae667024a62a90179f395bfdc2b35f3efd2")));
assert_eq!(merge_request.diff_refs.base_sha,
assert_eq!(merge_request.diff_refs.as_ref().unwrap().base_sha,
Some(ObjectId::new("981262b03fc0149c1677ca51ea47b570e30d6a90")));
assert_eq!(merge_request.diff_refs.head_sha,
assert_eq!(merge_request.diff_refs.as_ref().unwrap().head_sha,
Some(ObjectId::new("04e94ae667024a62a90179f395bfdc2b35f3efd2")));
assert_eq!(merge_request.diff_refs.start_sha,
assert_eq!(merge_request.diff_refs.as_ref().unwrap().start_sha,
Some(ObjectId::new("981262b03fc0149c1677ca51ea47b570e30d6a90")));
assert_eq!(merge_request.merge_commit_sha, None);
assert_eq!(merge_request.subscribed, Some(true));
......
......@@ -1434,7 +1434,7 @@ pub struct MergeRequest {
/// This is `None` if the source branch has been deleted.
pub sha: Option<ObjectId>,
/// The commits used to construct the merge request diffs.
pub diff_refs: DiffRefs,
pub diff_refs: Option<DiffRefs>,
/// The object ID of the commit which merged the merge request.
pub merge_commit_sha: Option<ObjectId>,
/// Whether the current user is subscribed or not.
......@@ -1527,7 +1527,7 @@ pub struct MergeRequestChanges {
/// This is `None` if the source branch has been deleted.
pub sha: Option<ObjectId>,
/// The commits used to construct the merge request diffs.
pub diff_refs: DiffRefs,
pub diff_refs: Option<DiffRefs>,
/// The object ID of the commit which merged the merge request.
pub merge_commit_sha: Option<ObjectId>,
/// GitLab does not include this in responses with lists of merge requests but
......
Markdown is supported
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