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

Merge topic 'gitlab-10.6'

f9328f93

 types: update for 10.6
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Merge-request: !120
parents e16ecd35 f9328f93
{"target_project_id": 855, "source_branch": "add_hook-api", "downvotes": 0, "labels": [], "updated_at": "2016-10-04T16:18:57.940-04:00", "work_in_progress": false, "assignee": {"username": "brad.king", "web_url": "https://gitlab.kitware.com/brad.king", "name": "Brad King", "state": "active", "avatar_url": "https://secure.gravatar.com/avatar/0617392a2f9fd505720d0c42cefc1a10?s=80&d=identicon", "id": 10}, "user_notes_count": 3, "id": 20215, "force_remove_source_branch": true, "target_branch": "master", "subscribed": true, "title": "gitlab: expose hook addition API", "merge_commit_sha": null, "merge_when_pipeline_succeeds": false, "time_stats": {"time_estimate": 0, "human_total_time_spent": null, "human_time_estimate": null, "total_time_spent": 0}, "state": "merged", "upvotes": 0, "project_id": 855, "description": "Fixes #5.", "iid": 35, "milestone": null, "discussion_locked": null, "source_project_id": 856, "merge_status": "can_be_merged", "changes_count": "3", "should_remove_source_branch": null, "created_at": "2016-10-04T15:56:43.276-04:00", "author": {"username": "ben.boeckel", "web_url": "https://gitlab.kitware.com/ben.boeckel", "name": "Ben Boeckel", "state": "active", "avatar_url": "https://secure.gravatar.com/avatar/2f5f7e99190174edb5a2f66b8653b0b2?s=80&d=identicon", "id": 13}, "sha": "04e94ae667024a62a90179f395bfdc2b35f3efd2", "web_url": "https://gitlab.kitware.com/utils/rust-gitlab/merge_requests/35"}
{"target_project_id": 855, "web_url": "https://gitlab.kitware.com/utils/rust-gitlab/merge_requests/35", "source_branch": "add_hook-api", "downvotes": 0, "labels": [], "updated_at": "2016-10-04T16:18:57.940-04:00", "work_in_progress": false, "assignee": {"username": "brad.king", "web_url": "https://gitlab.kitware.com/brad.king", "name": "Brad King", "state": "active", "avatar_url": "https://secure.gravatar.com/avatar/0617392a2f9fd505720d0c42cefc1a10?s=80&d=identicon", "id": 10}, "user_notes_count": 3, "closed_at": null, "id": 20215, "force_remove_source_branch": true, "target_branch": "master", "subscribed": true, "title": "gitlab: expose hook addition API", "merge_commit_sha": null, "merge_when_pipeline_succeeds": false, "time_stats": {"time_estimate": 0, "human_total_time_spent": null, "human_time_estimate": null, "total_time_spent": 0}, "state": "merged", "upvotes": 0, "project_id": 855, "merged_at": "2016-10-04T16:18:57.914-04:00", "description": "Fixes #5.", "iid": 35, "milestone": null, "discussion_locked": null, "closed_by": null, "source_project_id": 856, "merged_by": null, "merge_status": "can_be_merged", "changes_count": "3", "should_remove_source_branch": null, "created_at": "2016-10-04T15:56:43.276-04:00", "author": {"username": "ben.boeckel", "web_url": "https://gitlab.kitware.com/ben.boeckel", "name": "Ben Boeckel", "state": "active", "avatar_url": "https://secure.gravatar.com/avatar/2f5f7e99190174edb5a2f66b8653b0b2?s=80&d=identicon", "id": 13}, "sha": "04e94ae667024a62a90179f395bfdc2b35f3efd2", "allow_maintainer_to_push": null}
{"note_events": true, "job_events": true, "tag_push_events": true, "url": "http://kwrobot02:8082/gitlab.kitware.com", "created_at": "2016-12-16T11:37:24.589-05:00", "enable_ssl_verification": true, "pipeline_events": true, "issues_events": true, "push_events": true, "merge_requests_events": true, "project_id": 855, "repository_update_events": false, "id": 1262, "wiki_page_events": true}
{"note_events": true, "job_events": true, "tag_push_events": true, "confidential_note_events": true, "url": "http://kwrobot02:8082/gitlab.kitware.com", "created_at": "2016-12-16T11:37:24.589-05:00", "enable_ssl_verification": true, "confidential_issues_events": true, "pipeline_events": true, "issues_events": true, "push_events": true, "merge_requests_events": true, "project_id": 855, "repository_update_events": false, "id": 1262, "wiki_page_events": true}
......@@ -253,6 +253,11 @@ fn test_read_merge_request() {
assert_eq!(merge_request.updated_at,
Utc.ymd(2016, 10, 4)
.and_hms_milli(20, 18, 57, 940));
assert_eq!(merge_request.merged_at,
Some(Utc.ymd(2016, 10, 4)
.and_hms_milli(20, 18, 57, 914)));
assert!(merge_request.merged_by.is_none());
assert!(merge_request.closed_by.is_none());
assert_eq!(merge_request.target_branch, "master");
assert_eq!(merge_request.source_branch, "add_hook-api");
assert_eq!(merge_request.upvotes, 0);
......@@ -280,6 +285,7 @@ fn test_read_merge_request() {
assert_eq!(merge_request.target_project_id, ProjectId::new(855));
assert!(merge_request.labels.is_empty());
assert_eq!(merge_request.work_in_progress, false);
assert!(merge_request.allow_maintainer_to_push.is_none());
assert!(merge_request.milestone.is_none());
assert_eq!(merge_request.merge_when_pipeline_succeeds, false);
assert_eq!(merge_request.merge_status, MergeStatus::CanBeMerged);
......@@ -414,8 +420,10 @@ fn test_read_project_hook() {
assert_eq!(project_hook.push_events, true);
assert_eq!(project_hook.tag_push_events, true);
assert_eq!(project_hook.issues_events, true);
assert_eq!(project_hook.confidential_issues_events, true);
assert_eq!(project_hook.merge_requests_events, true);
assert_eq!(project_hook.note_events, true);
assert_eq!(project_hook.confidential_note_events, true);
assert_eq!(project_hook.repository_update_events, false);
assert_eq!(project_hook.enable_ssl_verification, true);
assert_eq!(project_hook.job_events, true);
......
......@@ -313,10 +313,14 @@ pub struct ProjectHook {
pub tag_push_events: bool,
/// Whether the hook is contacted for issue events.
pub issues_events: bool,
/// Whether the hook is contacted for confidential issue events.
pub confidential_issues_events: bool,
/// Whether the hook is contacted for merge request events.
pub merge_requests_events: bool,
/// Whether the hook is contacted for note events.
pub note_events: bool,
/// Whether the hook is contacted for confidential note events.
pub confidential_note_events: bool,
/// Whether the hook is contacted for repository update events.
pub repository_update_events: bool,
/// Whether the communication with the hook is verified using TLS certificates.
......@@ -1349,6 +1353,14 @@ pub struct MergeRequest {
pub created_at: DateTime<Utc>,
/// When the merge request was last updated.
pub updated_at: DateTime<Utc>,
/// When the merge request was merged.
pub merged_at: Option<DateTime<Utc>>,
/// When the merge request was closed.
pub closed_at: Option<DateTime<Utc>>,
/// The user that merged the merge request.
pub merged_by: Option<UserBasic>,
/// The user that closed the merge request.
pub closed_by: Option<UserBasic>,
/// The target branch of the merge request.
pub target_branch: String,
/// The source branch of the merge request.
......@@ -1371,6 +1383,8 @@ pub struct MergeRequest {
pub labels: Vec<String>,
/// Whether the merge request is a work-in-progress or not.
pub work_in_progress: bool,
/// Whether the merge request allows a maintainer to push.
pub allow_maintainer_to_push: Option<bool>,
/// The milestone of the merge request.
pub milestone: Option<Milestone>,
/// Whether the merge request will be merged once all pipelines succeed or not.
......@@ -1426,6 +1440,14 @@ pub struct MergeRequestChanges {
pub created_at: DateTime<Utc>,
/// When the merge request was last updated.
pub updated_at: DateTime<Utc>,
/// When the merge request was merged.
pub merged_at: Option<DateTime<Utc>>,
/// When the merge request was closed.
pub closed_at: Option<DateTime<Utc>>,
/// The user that merged the merge request.
pub merged_by: Option<UserBasic>,
/// The user that closed the merge request.
pub closed_by: Option<UserBasic>,
/// The target branch of the merge request.
pub target_branch: String,
/// The source branch of the merge request.
......@@ -1448,6 +1470,8 @@ pub struct MergeRequestChanges {
pub labels: Vec<String>,
/// Whether the merge request is a work-in-progress or not.
pub work_in_progress: bool,
/// Whether the merge request allows a maintainer to push.
pub allow_maintainer_to_push: Option<bool>,
/// The milestone of the merge request.
pub milestone: Option<Milestone>,
/// Whether the merge request will be merged once all jobs succeed or not.
......@@ -1491,6 +1515,10 @@ impl From<MergeRequestChanges> for MergeRequest {
state: mr.state,
created_at: mr.created_at,
updated_at: mr.updated_at,
merged_at: mr.merged_at,
closed_at: mr.closed_at,
merged_by: mr.merged_by,
closed_by: mr.closed_by,
target_branch: mr.target_branch,
source_branch: mr.source_branch,
upvotes: mr.upvotes,
......@@ -1502,6 +1530,7 @@ impl From<MergeRequestChanges> for MergeRequest {
target_project_id: mr.target_project_id,
labels: mr.labels,
work_in_progress: mr.work_in_progress,
allow_maintainer_to_push: mr.allow_maintainer_to_push,
milestone: mr.milestone,
merge_when_pipeline_succeeds: mr.merge_when_pipeline_succeeds,
merge_status: mr.merge_status,
......
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