Commit e72811f7 authored by Brad King's avatar Brad King Committed by Kitware Robot
Browse files

Merge topic 'gitlab-12.5'

2e8d673d types: update for 12.5
980ca35f

 src/test/types: Apply rustfmt
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Merge-request: !182
parents fcf93536 2e8d673d
......@@ -70,6 +70,7 @@
"printing_merge_request_link_enabled": true,
"public_jobs": true,
"readme_url": "https://gitlab.kitware.com/utils/scriptconfig/blob/master/README.rst",
"remove_source_branch_after_merge": null,
"repository_access_level": "enabled",
"request_access_enabled": false,
"resolve_outdated_diff_discussions": false,
......@@ -143,6 +144,7 @@
"printing_merge_request_link_enabled": true,
"public_jobs": true,
"readme_url": null,
"remove_source_branch_after_merge": null,
"repository_access_level": "enabled",
"request_access_enabled": false,
"resolve_outdated_diff_discussions": false,
......@@ -213,6 +215,7 @@
"printing_merge_request_link_enabled": true,
"public_jobs": true,
"readme_url": null,
"remove_source_branch_after_merge": null,
"repository_access_level": "disabled",
"request_access_enabled": false,
"resolve_outdated_diff_discussions": null,
......@@ -286,6 +289,7 @@
"printing_merge_request_link_enabled": true,
"public_jobs": true,
"readme_url": null,
"remove_source_branch_after_merge": null,
"repository_access_level": "enabled",
"request_access_enabled": false,
"resolve_outdated_diff_discussions": null,
......@@ -359,6 +363,7 @@
"printing_merge_request_link_enabled": true,
"public_jobs": true,
"readme_url": "https://gitlab.kitware.com/utils/git-hook-chain/blob/master/README.md",
"remove_source_branch_after_merge": null,
"repository_access_level": "private",
"request_access_enabled": false,
"resolve_outdated_diff_discussions": null,
......@@ -432,6 +437,7 @@
"printing_merge_request_link_enabled": true,
"public_jobs": true,
"readme_url": "https://gitlab.kitware.com/utils/gitlab-utils/blob/master/README.md",
"remove_source_branch_after_merge": null,
"repository_access_level": "private",
"request_access_enabled": false,
"resolve_outdated_diff_discussions": null,
......@@ -505,6 +511,7 @@
"printing_merge_request_link_enabled": true,
"public_jobs": true,
"readme_url": null,
"remove_source_branch_after_merge": null,
"repository_access_level": "enabled",
"request_access_enabled": false,
"resolve_outdated_diff_discussions": null,
......@@ -578,6 +585,7 @@
"printing_merge_request_link_enabled": true,
"public_jobs": true,
"readme_url": "https://gitlab.kitware.com/utils/rust-yaml-merge-keys/blob/master/README.md",
"remove_source_branch_after_merge": null,
"repository_access_level": "enabled",
"request_access_enabled": false,
"resolve_outdated_diff_discussions": null,
......@@ -651,6 +659,7 @@
"printing_merge_request_link_enabled": true,
"public_jobs": true,
"readme_url": "https://gitlab.kitware.com/utils/source-formatters/blob/master/README.md",
"remove_source_branch_after_merge": null,
"repository_access_level": "enabled",
"request_access_enabled": false,
"resolve_outdated_diff_discussions": null,
......@@ -722,6 +731,7 @@
"printing_merge_request_link_enabled": true,
"public_jobs": true,
"readme_url": "https://gitlab.kitware.com/utils/kwsys/blob/master/README.rst",
"remove_source_branch_after_merge": null,
"repository_access_level": "enabled",
"request_access_enabled": false,
"resolve_outdated_diff_discussions": null,
......@@ -792,6 +802,7 @@
"printing_merge_request_link_enabled": true,
"public_jobs": true,
"readme_url": null,
"remove_source_branch_after_merge": null,
"repository_access_level": "enabled",
"request_access_enabled": false,
"resolve_outdated_diff_discussions": null,
......@@ -865,6 +876,7 @@
"printing_merge_request_link_enabled": true,
"public_jobs": true,
"readme_url": "https://gitlab.kitware.com/utils/webhook-listen/blob/master/README.md",
"remove_source_branch_after_merge": null,
"repository_access_level": "enabled",
"request_access_enabled": false,
"resolve_outdated_diff_discussions": null,
......@@ -938,6 +950,7 @@
"printing_merge_request_link_enabled": true,
"public_jobs": true,
"readme_url": "https://gitlab.kitware.com/utils/ghostflow-director/blob/master/README.md",
"remove_source_branch_after_merge": null,
"repository_access_level": "enabled",
"request_access_enabled": false,
"resolve_outdated_diff_discussions": null,
......@@ -1011,6 +1024,7 @@
"printing_merge_request_link_enabled": true,
"public_jobs": true,
"readme_url": "https://gitlab.kitware.com/utils/kwiml/blob/master/README.md",
"remove_source_branch_after_merge": null,
"repository_access_level": "enabled",
"request_access_enabled": false,
"resolve_outdated_diff_discussions": null,
......@@ -1084,6 +1098,7 @@
"printing_merge_request_link_enabled": true,
"public_jobs": true,
"readme_url": "https://gitlab.kitware.com/utils/mantis-to-gitlab/blob/master/README.md",
"remove_source_branch_after_merge": null,
"repository_access_level": "enabled",
"request_access_enabled": true,
"resolve_outdated_diff_discussions": null,
......@@ -1157,6 +1172,7 @@
"printing_merge_request_link_enabled": true,
"public_jobs": true,
"readme_url": null,
"remove_source_branch_after_merge": null,
"repository_access_level": "enabled",
"request_access_enabled": false,
"resolve_outdated_diff_discussions": false,
......@@ -1230,6 +1246,7 @@
"printing_merge_request_link_enabled": true,
"public_jobs": true,
"readme_url": null,
"remove_source_branch_after_merge": null,
"repository_access_level": "enabled",
"request_access_enabled": false,
"resolve_outdated_diff_discussions": null,
......@@ -1303,6 +1320,7 @@
"printing_merge_request_link_enabled": true,
"public_jobs": true,
"readme_url": "https://gitlab.kitware.com/utils/rust-git-topic-stage/blob/master/README.md",
"remove_source_branch_after_merge": null,
"repository_access_level": "enabled",
"request_access_enabled": false,
"resolve_outdated_diff_discussions": null,
......@@ -1376,6 +1394,7 @@
"printing_merge_request_link_enabled": true,
"public_jobs": true,
"readme_url": "https://gitlab.kitware.com/utils/rust-json-job-dispatch/blob/master/README.md",
"remove_source_branch_after_merge": null,
"repository_access_level": "enabled",
"request_access_enabled": false,
"resolve_outdated_diff_discussions": null,
......@@ -1449,6 +1468,7 @@
"printing_merge_request_link_enabled": true,
"public_jobs": true,
"readme_url": "https://gitlab.kitware.com/utils/rust-git-workarea/blob/master/README.md",
"remove_source_branch_after_merge": null,
"repository_access_level": "enabled",
"request_access_enabled": false,
"resolve_outdated_diff_discussions": null,
......@@ -1522,6 +1542,7 @@
"printing_merge_request_link_enabled": true,
"public_jobs": true,
"readme_url": "https://gitlab.kitware.com/utils/rust-gitlab/blob/master/README.md",
"remove_source_branch_after_merge": null,
"repository_access_level": "enabled",
"request_access_enabled": false,
"resolve_outdated_diff_discussions": null,
......@@ -1595,6 +1616,7 @@
"printing_merge_request_link_enabled": true,
"public_jobs": true,
"readme_url": "https://gitlab.kitware.com/utils/gitrobot/blob/githooks/README.md",
"remove_source_branch_after_merge": null,
"repository_access_level": "enabled",
"request_access_enabled": false,
"resolve_outdated_diff_discussions": null,
......@@ -1668,6 +1690,7 @@
"printing_merge_request_link_enabled": true,
"public_jobs": true,
"readme_url": "https://gitlab.kitware.com/utils/gitsetup/blob/setup/README",
"remove_source_branch_after_merge": null,
"repository_access_level": "enabled",
"request_access_enabled": false,
"resolve_outdated_diff_discussions": null,
......
......@@ -27,6 +27,7 @@
"username": "ben.boeckel",
"web_url": "https://gitlab.kitware.com/ben.boeckel"
},
"blocking_discussions_resolved": true,
"changes_count": "3",
"closed_at": null,
"closed_by": null,
......@@ -41,6 +42,7 @@
"downvotes": 0,
"first_deployed_to_production_at": null,
"force_remove_source_branch": true,
"has_conflicts": false,
"head_pipeline": {
"before_sha": null,
"committed_at": null,
......@@ -97,6 +99,7 @@
"source_branch": "add_hook-api",
"source_project_id": 856,
"squash": false,
"squash_commit_sha": null,
"state": "merged",
"subscribed": true,
"target_branch": "master",
......
......@@ -65,6 +65,7 @@
"printing_merge_request_link_enabled": true,
"public_jobs": true,
"readme_url": "https://gitlab.kitware.com/utils/rust-gitlab/blob/master/README.md",
"remove_source_branch_after_merge": null,
"repository_access_level": "enabled",
"request_access_enabled": false,
"resolve_outdated_diff_discussions": null,
......
......@@ -314,21 +314,35 @@ fn check_merge_request_b(merge_request: &MergeRequest) {
assert_eq!(merge_request.squash, false);
assert_eq!(merge_request.merge_when_pipeline_succeeds, false);
assert_eq!(merge_request.merge_status, MergeStatus::CanBeMerged);
check_sha(merge_request.sha.as_ref(), "04e94ae667024a62a90179f395bfdc2b35f3efd2");
check_sha(
merge_request.sha.as_ref(),
"04e94ae667024a62a90179f395bfdc2b35f3efd2",
);
let diff_refs = merge_request.diff_refs.as_ref().unwrap();
check_sha(diff_refs.base_sha.as_ref(), "981262b03fc0149c1677ca51ea47b570e30d6a90");
check_sha(diff_refs.head_sha.as_ref(), "04e94ae667024a62a90179f395bfdc2b35f3efd2");
check_sha(diff_refs.start_sha.as_ref(), "981262b03fc0149c1677ca51ea47b570e30d6a90");
check_sha(
diff_refs.base_sha.as_ref(),
"981262b03fc0149c1677ca51ea47b570e30d6a90",
);
check_sha(
diff_refs.head_sha.as_ref(),
"04e94ae667024a62a90179f395bfdc2b35f3efd2",
);
check_sha(
diff_refs.start_sha.as_ref(),
"981262b03fc0149c1677ca51ea47b570e30d6a90",
);
assert_eq!(merge_request.merge_error, None);
assert_eq!(merge_request.rebase_in_progress, None);
assert_eq!(merge_request.merge_commit_sha, None);
assert_eq!(merge_request.subscribed, Some(true));
check_empty_time_stats(&merge_request.time_stats);
assert_eq!(merge_request.blocking_discussions_resolved, true);
assert_eq!(merge_request.changes_count.as_ref().unwrap(), "3");
assert_eq!(merge_request.user_notes_count, 3);
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.has_conflicts, false);
assert_eq!(merge_request.user.as_ref().unwrap().can_merge, true);
assert_eq!(
merge_request.web_url,
......@@ -497,6 +511,7 @@ fn check_project_b(project: &Project) {
project.only_allow_merge_if_all_discussions_are_resolved,
None,
);
assert_eq!(project.remove_source_branch_after_merge, None);
assert_eq!(project.printing_merge_request_link_enabled, Some(true));
assert_eq!(project.request_access_enabled, false);
assert_eq!(project.resolve_outdated_diff_discussions, None);
......
......@@ -608,6 +608,8 @@ pub struct Project {
pub only_allow_merge_if_pipeline_succeeds: Option<bool>,
/// Whether the project only enables the merge button if all discussions are resolved.
pub only_allow_merge_if_all_discussions_are_resolved: Option<bool>,
/// Whether enable 'Delete source branch' option by default for all new merge requests.
pub remove_source_branch_after_merge: Option<bool>,
/// Whether to show the link to create/view merge request when pusing from command line.
pub printing_merge_request_link_enabled: Option<bool>,
/// Whether access to the project may be requested.
......@@ -1688,12 +1690,16 @@ pub struct MergeRequest {
pub rebase_in_progress: Option<bool>,
/// The object ID of the commit which merged the merge request.
pub merge_commit_sha: Option<ObjectId>,
/// The object ID of the merge request squash commit.
pub squash_commit_sha: Option<ObjectId>,
/// Whether the current user is subscribed or not.
/// GitLab does not include this in responses with lists of merge requests but
/// does on an individual merge request.
pub subscribed: Option<bool>,
/// Time estimates.
pub time_stats: IssuableTimeStats,
/// Whether or not all blocking discussions are resolved.
pub blocking_discussions_resolved: bool,
/// The number of paths changed by the merge request.
///
/// This is an integer suffixed by `+` if there are more files changed than some threshold
......@@ -1707,6 +1713,8 @@ pub struct MergeRequest {
pub should_remove_source_branch: Option<bool>,
/// Whether the merge request should be deleted or not (set by the author).
pub force_remove_source_branch: Option<bool>,
/// Whether the merge request currently has conflicts with the target branch.
pub has_conflicts: bool,
/// Information about current user's access to the merge request.
pub user: Option<MergeRequestUser>,
/// The URL of the merge request.
......@@ -1786,11 +1794,15 @@ pub struct MergeRequestChanges {
pub rebase_in_progress: Option<bool>,
/// The object ID of the commit which merged the merge request.
pub merge_commit_sha: Option<ObjectId>,
/// The object ID of the merge request squash commit.
pub squash_commit_sha: Option<ObjectId>,
/// GitLab does not include this in responses with lists of merge requests but
/// does on an individual merge request.
pub subscribed: Option<bool>,
/// Time estimates.
pub time_stats: IssuableTimeStats,
/// Whether or not all blocking discussions are resolved.
pub blocking_discussions_resolved: bool,
/// The number of paths changed by the merge request.
pub changes_count: Option<String>,
/// The number of comments on the merge request.
......@@ -1801,6 +1813,8 @@ pub struct MergeRequestChanges {
pub should_remove_source_branch: Option<bool>,
/// Whether the merge request should be deleted or not (set by the author).
pub force_remove_source_branch: Option<bool>,
/// Whether the merge request currently has conflicts with the target branch.
pub has_conflicts: bool,
/// Information about current user's access to the merge request.
pub user: MergeRequestUser,
/// The URL of the merge request.
......@@ -1845,13 +1859,16 @@ impl From<MergeRequestChanges> for MergeRequest {
merge_error: mr.merge_error,
rebase_in_progress: mr.rebase_in_progress,
merge_commit_sha: mr.merge_commit_sha,
squash_commit_sha: mr.squash_commit_sha,
subscribed: mr.subscribed,
time_stats: mr.time_stats,
blocking_discussions_resolved: mr.blocking_discussions_resolved,
changes_count: mr.changes_count,
user_notes_count: mr.user_notes_count,
discussion_locked: mr.discussion_locked,
should_remove_source_branch: mr.should_remove_source_branch,
force_remove_source_branch: mr.force_remove_source_branch,
has_conflicts: mr.has_conflicts,
user: Some(mr.user),
web_url: mr.web_url,
}
......
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