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

Merge topic 'gitlab-12.4'

9e71288e

 types: update for 12.4
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Merge-request: !176
parents f6ebd73d 9e71288e
......@@ -39,6 +39,7 @@
},
"discussion_locked": null,
"downvotes": 0,
"first_deployed_to_production_at": null,
"force_remove_source_branch": true,
"head_pipeline": {
"before_sha": null,
......@@ -79,6 +80,8 @@
"id": 20215,
"iid": 35,
"labels": [],
"latest_build_finished_at": null,
"latest_build_started_at": null,
"merge_commit_sha": null,
"merge_error": null,
"merge_status": "can_be_merged",
......@@ -86,6 +89,7 @@
"merged_at": "2016-10-04T16:18:57.914-04:00",
"merged_by": null,
"milestone": null,
"pipeline": null,
"project_id": 855,
"reference": "!35",
"sha": "04e94ae667024a62a90179f395bfdc2b35f3efd2",
......
{
"id": 145400,
"created_at": "2019-10-25T15:22:38.463-04:00",
"id": 149249,
"ref": "master",
"sha": "7134adce4522c399cdab16e128b0a1af15b93f14",
"sha": "f6ebd73d4a8f42f6a642030c27b66330023b7a88",
"status": "success",
"web_url": "https://gitlab.kitware.com/utils/rust-gitlab/pipelines/145400"
"updated_at": "2019-10-25T15:35:24.570-04:00",
"web_url": "https://gitlab.kitware.com/utils/rust-gitlab/pipelines/149249"
}
......@@ -8,10 +8,12 @@
"created_at": "2016-11-08T14:30:13.000Z",
"id": "de4ac3cf96cb8a0893be22b03f5171d934f9d392",
"last_pipeline": {
"created_at": "2016-11-08T09:30:16.081-05:00",
"id": 34289,
"ref": "master",
"sha": "de4ac3cf96cb8a0893be22b03f5171d934f9d392",
"status": "success",
"updated_at": "2016-11-08T09:35:32.670-05:00",
"web_url": "https://gitlab.kitware.com/utils/rust-gitlab/pipelines/34289"
},
"message": "Merge topic 'mr-awards'\n\na222c553 gitlab: add a method for MR award queries\n\nAcked-by: Kitware Robot <kwrobot@kitware.com>\nReviewed-by: Brad King <brad.king@kitware.com>\nMerge-request: !46\n",
......
......@@ -769,6 +769,14 @@ fn test_read_repo_commit_detail() {
ObjectId::new("de4ac3cf96cb8a0893be22b03f5171d934f9d392"),
);
assert_eq!(last_pipeline.status, StatusState::Success);
assert_eq!(
last_pipeline.created_at,
Some(Utc.ymd(2016, 11, 8).and_hms_milli(14, 30, 16, 81)),
);
assert_eq!(
last_pipeline.updated_at,
Some(Utc.ymd(2016, 11, 8).and_hms_milli(14, 35, 32, 670)),
);
assert_eq!(
last_pipeline.web_url,
"https://gitlab.kitware.com/utils/rust-gitlab/pipelines/34289",
......@@ -895,16 +903,24 @@ fn test_read_resoruce_label_events() {
fn test_read_pipelines() {
let pipeline_basic: PipelineBasic = read_test_file("pipeline_basic");
assert_eq!(pipeline_basic.id, PipelineId::new(145_400));
assert_eq!(pipeline_basic.id, PipelineId::new(149_249));
assert_eq!(pipeline_basic.status, StatusState::Success);
assert_eq!(pipeline_basic.ref_, Some("master".into()));
assert_eq!(
pipeline_basic.sha,
ObjectId::new("7134adce4522c399cdab16e128b0a1af15b93f14"),
ObjectId::new("f6ebd73d4a8f42f6a642030c27b66330023b7a88"),
);
assert_eq!(
pipeline_basic.created_at,
Some(Utc.ymd(2019, 10, 25).and_hms_milli(19, 22, 38, 463)),
);
assert_eq!(
pipeline_basic.updated_at,
Some(Utc.ymd(2019, 10, 25).and_hms_milli(19, 35, 24, 570)),
);
assert_eq!(
pipeline_basic.web_url,
"https://gitlab.kitware.com/utils/rust-gitlab/pipelines/145400",
"https://gitlab.kitware.com/utils/rust-gitlab/pipelines/149249",
);
}
......
......@@ -2527,6 +2527,10 @@ pub struct PipelineBasic {
pub sha: ObjectId,
/// The status of the pipeline.
pub status: StatusState,
/// When the pipeline was created.
pub created_at: Option<DateTime<Utc>>,
/// When the pipeline was last updated.
pub updated_at: Option<DateTime<Utc>>,
/// The URL to the pipeline page.
pub web_url: String,
}
......
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