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

Merge topic 'gitlab-11.2'

d6a27329

 types: Update for 11.2
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Merge-request: !128
parents 4394e526 d6a27329
{"status": "success", "committer_email": "kwrobot@kitware.com", "stats": {"deletions": 0, "additions": 8, "total": 8}, "short_id": "de4ac3cf", "title": "Merge topic 'mr-awards'", "author_email": "brad.king@kitware.com", "committer_name": "Kitware Robot", "created_at": "2016-11-08T09:30:13.000-05:00", "author_name": "Brad King", "parent_ids": ["559f5f4a2bfe1f48e9e95afa09c029deb655cf7d", "a222c5539569cda6999b8069f1e51a5202c30711"], "committed_date": "2016-11-08T09:30:13.000-05:00", "last_pipeline": {"status": "success", "sha": "de4ac3cf96cb8a0893be22b03f5171d934f9d392", "ref": "master", "id": 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", "project_id": 855, "authored_date": "2016-11-08T09:30:13.000-05:00", "id": "de4ac3cf96cb8a0893be22b03f5171d934f9d392"}
{"status": "success", "committer_email": "kwrobot@kitware.com", "stats": {"deletions": 0, "additions": 8, "total": 8}, "short_id": "de4ac3cf", "title": "Merge topic 'mr-awards'", "author_email": "brad.king@kitware.com", "committer_name": "Kitware Robot", "created_at": "2016-11-08T14:30:13.000Z", "author_name": "Brad King", "parent_ids": ["559f5f4a2bfe1f48e9e95afa09c029deb655cf7d", "a222c5539569cda6999b8069f1e51a5202c30711"], "committed_date": "2016-11-08T14:30:13.000Z", "last_pipeline": {"status": "success", "sha": "de4ac3cf96cb8a0893be22b03f5171d934f9d392", "web_url": "https://gitlab.kitware.com/utils/rust-gitlab/pipelines/34289", "ref": "master", "id": 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", "project_id": 855, "authored_date": "2016-11-08T14:30:13.000Z", "id": "de4ac3cf96cb8a0893be22b03f5171d934f9d392"}
{"two_factor_enabled": true, "can_create_project": true, "confirmed_at": "2015-02-26T10:58:34.660-05:00", "twitter": "", "linkedin": "", "color_scheme_id": 4, "web_url": "https://gitlab.kitware.com/kwrobot", "skype": "", "identities": [], "id": 11, "projects_limit": 50, "current_sign_in_at": "2017-07-10T11:35:58.336-04:00", "state": "active", "location": null, "email": "kwrobot@kitware.com", "website_url": "", "username": "kwrobot", "bio": "", "last_sign_in_at": "2017-06-05T14:46:29.512-04:00", "last_activity_on": "2017-10-10", "external": false, "organization": null, "name": "Kitware Robot", "can_create_group": true, "created_at": "2015-02-26T10:58:34.670-05:00", "avatar_url": "https://secure.gravatar.com/avatar/9ddcd45fcb89d966aab95b1f1002f84c?s=80&d=identicon", "theme_id": null}
{"two_factor_enabled": true, "can_create_project": true, "confirmed_at": "2015-02-26T10:58:34.660-05:00", "twitter": "", "linkedin": "", "color_scheme_id": 4, "web_url": "https://gitlab.kitware.com/kwrobot", "skype": "", "identities": [], "id": 11, "projects_limit": 50, "current_sign_in_at": "2018-08-24T10:10:45.623-04:00", "state": "active", "location": null, "email": "kwrobot@kitware.com", "website_url": "", "username": "kwrobot", "bio": "", "private_profile": null, "last_sign_in_at": "2018-07-18T07:33:59.612-04:00", "last_activity_on": "2018-08-28", "external": false, "organization": null, "name": "Kitware Robot", "can_create_group": true, "created_at": "2015-02-26T10:58:34.670-05:00", "avatar_url": "https://secure.gravatar.com/avatar/9ddcd45fcb89d966aab95b1f1002f84c?s=80&d=identicon", "theme_id": null}
{"two_factor_enabled": true, "can_create_project": true, "confirmed_at": "2015-02-26T10:58:34.660-05:00", "twitter": "", "linkedin": "", "color_scheme_id": 4, "web_url": "https://gitlab.kitware.com/kwrobot", "skype": "", "is_admin": true, "identities": [], "id": 11, "projects_limit": 50, "current_sign_in_at": "2017-07-10T11:35:58.336-04:00", "state": "active", "location": null, "email": "kwrobot@kitware.com", "website_url": "", "username": "kwrobot", "bio": "", "last_sign_in_at": "2017-06-05T14:46:29.512-04:00", "last_activity_on": "2017-10-10", "external": false, "organization": null, "name": "Kitware Robot", "can_create_group": true, "created_at": "2015-02-26T10:58:34.670-05:00", "avatar_url": "https://secure.gravatar.com/avatar/9ddcd45fcb89d966aab95b1f1002f84c?s=80&d=identicon", "theme_id": null}
{"two_factor_enabled": true, "can_create_project": true, "confirmed_at": "2015-02-26T10:58:34.660-05:00", "twitter": "", "linkedin": "", "color_scheme_id": 4, "web_url": "https://gitlab.kitware.com/kwrobot", "skype": "", "is_admin": true, "identities": [], "id": 11, "projects_limit": 50, "current_sign_in_at": "2018-08-24T10:10:45.623-04:00", "state": "active", "location": null, "email": "kwrobot@kitware.com", "website_url": "", "username": "kwrobot", "bio": "", "private_profile": null, "last_sign_in_at": "2018-07-18T07:33:59.612-04:00", "last_activity_on": "2018-08-28", "external": false, "organization": null, "name": "Kitware Robot", "can_create_group": true, "created_at": "2015-02-26T10:58:34.670-05:00", "avatar_url": "https://secure.gravatar.com/avatar/9ddcd45fcb89d966aab95b1f1002f84c?s=80&d=identicon", "theme_id": null}
......@@ -523,6 +523,7 @@ fn test_read_repo_commit_detail() {
assert_eq!(last_pipeline.ref_, Some("master".to_string()));
assert_eq!(last_pipeline.sha, ObjectId::new("de4ac3cf96cb8a0893be22b03f5171d934f9d392"));
assert_eq!(last_pipeline.status, StatusState::Success);
assert_eq!(last_pipeline.web_url, "https://gitlab.kitware.com/utils/rust-gitlab/pipelines/34289".to_string());
} else {
panic!("expected to have a last_pipeline for this commit");
}
......@@ -541,10 +542,11 @@ fn test_read_user() {
Some("https://secure.gravatar.com/avatar/9ddcd45fcb89d966aab95b1f1002f84c?s=80&d=identicon".to_string()));
assert_eq!(user.web_url, "https://gitlab.kitware.com/kwrobot");
assert_eq!(user.created_at,
Utc.ymd(2015, 2, 26)
.and_hms_milli(15, 58, 34, 670));
Some(Utc.ymd(2015, 2, 26)
.and_hms_milli(15, 58, 34, 670)));
assert_eq!(user.is_admin, None);
assert_eq!(user.bio, Some("".to_string()));
assert_eq!(user.private_profile, None);
assert_eq!(user.location, None);
assert_eq!(user.skype, "");
assert_eq!(user.linkedin, "");
......@@ -566,10 +568,11 @@ fn test_read_user_public() {
assert_eq!(user_public.web_url,
"https://gitlab.kitware.com/kwrobot");
assert_eq!(user_public.created_at,
Utc.ymd(2015, 2, 26)
.and_hms_milli(15, 58, 34, 670));
Some(Utc.ymd(2015, 2, 26)
.and_hms_milli(15, 58, 34, 670)));
assert_eq!(user_public.is_admin, Some(true));
assert_eq!(user_public.bio, Some("".to_string()));
assert_eq!(user_public.private_profile, None);
assert_eq!(user_public.location, None);
assert_eq!(user_public.skype, "");
assert_eq!(user_public.linkedin, "");
......@@ -577,10 +580,10 @@ fn test_read_user_public() {
assert_eq!(user_public.website_url, "");
assert_eq!(user_public.organization, None);
assert_eq!(user_public.last_sign_in_at,
Some(Utc.ymd(2017, 6, 5)
.and_hms_milli(18, 46, 29, 512)));
Some(Utc.ymd(2018, 7, 18)
.and_hms_milli(11, 33, 59, 612)));
assert_eq!(user_public.last_activity_on,
Some(NaiveDate::from_ymd(2017, 10, 10)));
Some(NaiveDate::from_ymd(2018, 8, 28)));
assert_eq!(user_public.confirmed_at,
Some(Utc.ymd(2015, 2, 26)
.and_hms_milli(15, 58, 34, 660)));
......@@ -589,8 +592,8 @@ fn test_read_user_public() {
assert_eq!(user_public.color_scheme_id, ColorSchemeId::new(4));
assert_eq!(user_public.projects_limit, 50);
assert_eq!(user_public.current_sign_in_at,
Some(Utc.ymd(2017, 7, 10)
.and_hms_milli(15, 35, 58, 336)));
Some(Utc.ymd(2018, 8, 24)
.and_hms_milli(14, 10, 45, 623)));
assert!(user_public.identities.is_empty());
assert_eq!(user_public.can_create_group, true);
assert_eq!(user_public.can_create_project, true);
......
......@@ -94,13 +94,15 @@ pub struct User {
/// The URL of the user's profile page.
pub web_url: String,
/// When the account was created.
pub created_at: DateTime<Utc>,
pub created_at: Option<DateTime<Utc>>,
/// Whether the user is an administrator or not.
///
/// Only available when talking to GitLab as an admin.
pub is_admin: Option<bool>,
/// Self-described biography of the user.
pub bio: Option<String>,
/// Whether the account has a private profile.
pub private_profile: Option<bool>,
/// Geographic location of the user.
pub location: Option<String>,
......@@ -168,13 +170,15 @@ pub struct UserPublic {
/// The URL of the user's profile page.
pub web_url: String,
/// When the account was created.
pub created_at: DateTime<Utc>,
pub created_at: Option<DateTime<Utc>>,
/// Whether the user is an administrator or not.
///
/// Only available when talking to GitLab as an admin.
pub is_admin: Option<bool>,
/// Self-described biography of the user.
pub bio: Option<String>,
/// Whether the account has a private profile.
pub private_profile: Option<bool>,
/// Geographic location of the user.
pub location: Option<String>,
......@@ -245,6 +249,7 @@ impl From<UserPublic> for User {
created_at: user.created_at,
is_admin: user.is_admin,
bio: user.bio,
private_profile: user.private_profile,
location: user.location,
skype: user.skype,
linkedin: user.linkedin,
......@@ -2161,4 +2166,6 @@ pub struct PipelineBasic {
pub sha: ObjectId,
/// The status of the pipeline.
pub status: StatusState,
/// 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