Commit eedc3bb7 authored by Ben Boeckel's avatar Ben Boeckel

gitlab: update for 9.1

parent 38497368
[package]
name = "gitlab"
version = "0.900.0"
version = "0.901.0"
authors = ["Ben Boeckel <ben.boeckel@kitware.com>"]
license = "MIT/Apache-2.0"
description = """
......
......@@ -3,7 +3,7 @@
This library implements an interface to communicate with a Gitlab instance. Not
all API endpoints are implemented, but patches are welcome.
The API is based off of the 9.0.0 v3 API and will likely aggressively track
The API is based off of the 9.1.0 v3 API and will likely aggressively track
new API additions, so the newest release may not support talking to older
releases where fields have been added.
......@@ -31,13 +31,14 @@ possible. Instead, the crate uses the following versioning scheme:
* Gitlab 8.16 support → 0.816.x
* Gitlab 8.17 support → 0.817.x
* Gitlab 9.0 support → 0.900.x
* Gitlab 9.1 support → 0.901.x
Minor versions may fix bugs, add API endpoint bindings, or improve webhook
coverage. It is recommended to depend on the full version of the crate since
types may change in patch-level updates in order to match Gitlab's interface:
```toml
gitlab = "0.900.0"
gitlab = "0.901.0"
```
# API bugs
......
{"lfs_enabled": true, "request_access_enabled": true, "forks_count": 3, "only_allow_merge_if_all_discussions_are_resolved": null, "container_registry_enabled": true, "web_url": "https://gitlab.kitware.com/utils/rust-gitlab", "wiki_enabled": true, "public_builds": true, "id": 855, "merge_requests_enabled": true, "archived": false, "snippets_enabled": false, "http_url_to_repo": "https://gitlab.kitware.com/utils/rust-gitlab.git", "namespace": {"path": "utils", "kind": "group", "id": 498, "full_path": "utils", "name": "Utils"}, "star_count": 0, "avatar_url": null, "issues_enabled": true, "path_with_namespace": "utils/rust-gitlab", "public": true, "shared_with_groups": [], "description": "Rust library for communicating with a Gitlab instance.", "default_branch": "master", "only_allow_merge_if_build_succeeds": false, "ssh_url_to_repo": "git@gitlab.kitware.com:utils/rust-gitlab.git", "path": "rust-gitlab", "visibility_level": 20, "permissions": {"group_access": {"notification_level": 3, "access_level": 50}, "project_access": null}, "open_issues_count": 0, "last_activity_at": "2017-04-03T09:09:26.696-04:00", "name": "rust-gitlab", "name_with_namespace": "Utils / rust-gitlab", "created_at": "2016-06-29T13:35:12.495-04:00", "builds_enabled": false, "creator_id": 13, "shared_runners_enabled": true, "tag_list": []}
{"lfs_enabled": true, "request_access_enabled": true, "forks_count": 3, "only_allow_merge_if_all_discussions_are_resolved": null, "container_registry_enabled": true, "web_url": "https://gitlab.kitware.com/utils/rust-gitlab", "wiki_enabled": true, "public_builds": true, "id": 855, "merge_requests_enabled": true, "archived": false, "snippets_enabled": false, "http_url_to_repo": "https://gitlab.kitware.com/utils/rust-gitlab.git", "namespace": {"path": "utils", "kind": "group", "id": 498, "full_path": "utils", "name": "Utils"}, "star_count": 0, "avatar_url": null, "issues_enabled": true, "path_with_namespace": "utils/rust-gitlab", "public": true, "shared_with_groups": [], "description": "Rust library for communicating with a Gitlab instance.", "default_branch": "master", "only_allow_merge_if_build_succeeds": false, "ssh_url_to_repo": "git@gitlab.kitware.com:utils/rust-gitlab.git", "path": "rust-gitlab", "visibility_level": 20, "permissions": {"group_access": {"notification_level": 3, "access_level": 50}, "project_access": null}, "open_issues_count": 0, "last_activity_at": "2017-05-05T15:37:36.901-04:00", "name": "rust-gitlab", "name_with_namespace": "Utils / rust-gitlab", "created_at": "2016-06-29T13:35:12.495-04:00", "builds_enabled": false, "creator_id": 13, "shared_runners_enabled": true, "tag_list": []}
{"name": "master", "developers_can_merge": false, "protected": true, "developers_can_push": false, "commit": {"committer_email": "kwrobot@kitware.com", "short_id": "06356d86", "title": "Merge topic 'release-0.817.1'", "author_email": "brad.king@kitware.com", "committer_name": "Kitware Robot", "created_at": "2017-03-30T15:23:13.000-04:00", "author_name": "Brad King", "parent_ids": ["a16142046f63bd2ed6d9ffe858013fb5c927539b", "a0cfdfdaa5caf7476c8b57c8ae23aa250f7b6711"], "committed_date": "2017-03-30T15:23:13.000-04:00", "message": "Merge topic 'release-0.817.1'\n\na0cfdfda cargo: prep for 0.817.1\nb6587827 cargo: loosen the error-chain dependency\n9323c337 cargo: separate public and private dependencies\n\nAcked-by: Kitware Robot <kwrobot@kitware.com>\nReviewed-by: Brad King <brad.king@kitware.com>\nMerge-request: !83\n", "authored_date": "2017-03-30T19:23:11.000+00:00", "id": "06356d86ed28f28c99052338fad2b506214bf5f7"}, "merged": false}
{"name": "master", "developers_can_merge": false, "protected": true, "developers_can_push": false, "commit": {"committer_email": "kwrobot@kitware.com", "short_id": "1e402a90", "title": "Merge topic 'mod-crates'", "author_email": "brad.king@kitware.com", "committer_name": "Kitware Robot", "created_at": "2017-04-24T11:13:28.000-04:00", "author_name": "Brad King", "parent_ids": ["7cb21fade3321158cb5dbf85c41ed516889ff811", "19357a8271c394d9a8a01bbf9bc3c7b39c2820cb"], "committed_date": "2017-04-24T11:13:28.000-04:00", "message": "Merge topic 'mod-crates'\n\n19357a82 crates: add a module for importing crates\n\nAcked-by: Kitware Robot <kwrobot@kitware.com>\nMerge-request: !86\n", "authored_date": "2017-04-24T15:13:24.000+00:00", "id": "1e402a90a98fb60455a9be6d33da872ebd63f184"}, "merged": false}
{"two_factor_enabled": true, "can_create_project": true, "confirmed_at": "2015-02-26T12:23:28.693-05:00", "twitter": "", "linkedin": "", "color_scheme_id": 2, "web_url": "https://gitlab.kitware.com/ben.boeckel", "skype": "", "identities": [], "id": 13, "projects_limit": 50, "current_sign_in_at": "2017-04-03T13:34:33.907-04:00", "state": "active", "location": null, "email": "ben.boeckel@kitware.com", "website_url": "", "username": "ben.boeckel", "bio": null, "last_sign_in_at": "2017-04-03T12:23:14.579-04:00", "is_admin": false, "external": false, "name": "Ben Boeckel", "can_create_group": true, "created_at": "2015-02-26T12:23:28.730-05:00", "avatar_url": "https://secure.gravatar.com/avatar/2f5f7e99190174edb5a2f66b8653b0b2?s=80&d=identicon", "organization": null}
{"two_factor_enabled": true, "can_create_project": true, "confirmed_at": "2015-02-26T12:23:28.693-05:00", "twitter": "", "linkedin": "", "color_scheme_id": 2, "web_url": "https://gitlab.kitware.com/ben.boeckel", "skype": "", "identities": [], "id": 13, "projects_limit": 50, "current_sign_in_at": "2017-05-11T13:11:30.649-04:00", "state": "active", "location": null, "email": "ben.boeckel@kitware.com", "website_url": "", "username": "ben.boeckel", "bio": null, "last_sign_in_at": "2017-05-11T10:37:30.977-04:00", "is_admin": false, "external": false, "organization": null, "name": "Ben Boeckel", "can_create_group": true, "created_at": "2015-02-26T12:23:28.730-05:00", "avatar_url": "https://secure.gravatar.com/avatar/2f5f7e99190174edb5a2f66b8653b0b2?s=80&d=identicon", "last_activity_on": "2017-05-10"}
......@@ -6,7 +6,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
use crates::chrono::{TimeZone, UTC};
use crates::chrono::{NaiveDate, TimeZone, UTC};
use crates::serde::de::DeserializeOwned;
use crates::serde_json::from_reader;
......@@ -327,8 +327,8 @@ fn test_read_project() {
UTC.ymd(2016, 6, 29)
.and_hms_milli(17, 35, 12, 495));
assert_eq!(project.last_activity_at,
UTC.ymd(2017, 4, 3)
.and_hms_milli(13, 9, 26, 696));
UTC.ymd(2017, 5, 5)
.and_hms_milli(19, 37, 36, 901));
assert_eq!(project.shared_runners_enabled, true);
assert_eq!(project.lfs_enabled, true);
assert_eq!(project.creator_id, UserId::new(13));
......@@ -396,29 +396,28 @@ fn test_read_repo_branch() {
assert_eq!(commit.author_email, "brad.king@kitware.com");
assert_eq!(commit.author_name, "Brad King");
assert_eq!(commit.authored_date,
UTC.ymd(2017, 3, 30)
.and_hms_milli(19, 23, 11, 0));
UTC.ymd(2017, 4, 24)
.and_hms_milli(15, 13, 24, 0));
assert_eq!(commit.committed_date,
UTC.ymd(2017, 3, 30)
.and_hms_milli(19, 23, 13, 0));
UTC.ymd(2017, 4, 24)
.and_hms_milli(15, 13, 28, 0));
assert_eq!(commit.created_at,
UTC.ymd(2017, 3, 30)
.and_hms_milli(19, 23, 13, 0));
UTC.ymd(2017, 4, 24)
.and_hms_milli(15, 13, 28, 0));
assert_eq!(commit.committer_email, "kwrobot@kitware.com");
assert_eq!(commit.committer_name, "Kitware Robot");
assert_eq!(commit.id,
ObjectId::new("06356d86ed28f28c99052338fad2b506214bf5f7"));
assert_eq!(commit.short_id, ObjectId::new("06356d86"));
ObjectId::new("1e402a90a98fb60455a9be6d33da872ebd63f184"));
assert_eq!(commit.short_id, ObjectId::new("1e402a90"));
assert_eq!(commit.title, "Merge topic 'mod-crates'");
assert_eq!(commit.message,
"Merge topic 'release-0.817.1'\n\na0cfdfda cargo: prep for 0.817.1\nb6587827 \
cargo: loosen the error-chain dependency\n9323c337 cargo: separate public and \
private dependencies\n\nAcked-by: Kitware Robot \
<kwrobot@kitware.com>\nReviewed-by: Brad King \
<brad.king@kitware.com>\nMerge-request: !83\n");
"Merge topic 'mod-crates'\n\n19357a82 crates: add a module for importing \
crates\n\nAcked-by: Kitware Robot <kwrobot@kitware.com>\nMerge-request: \
!86\n");
assert_eq!(commit.parent_ids,
vec![
ObjectId::new("a16142046f63bd2ed6d9ffe858013fb5c927539b"),
ObjectId::new("a0cfdfdaa5caf7476c8b57c8ae23aa250f7b6711"),
ObjectId::new("7cb21fade3321158cb5dbf85c41ed516889ff811"),
ObjectId::new("19357a8271c394d9a8a01bbf9bc3c7b39c2820cb"),
]);
} else {
panic!("expected to have a commit for the branch");
......@@ -512,8 +511,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, 4, 3)
.and_hms_milli(16, 23, 14, 579)));
Some(UTC.ymd(2017, 5, 11)
.and_hms_milli(14, 37, 30, 977)));
assert_eq!(user_public.last_activity_on,
Some(NaiveDate::from_ymd(2017, 5, 10)));
assert_eq!(user_public.confirmed_at,
UTC.ymd(2015, 2, 26)
.and_hms_milli(17, 23, 28, 693));
......@@ -521,8 +522,8 @@ fn test_read_user_public() {
assert_eq!(user_public.color_scheme_id, ColorSchemeId::new(2));
assert_eq!(user_public.projects_limit, 50);
assert_eq!(user_public.current_sign_in_at,
Some(UTC.ymd(2017, 4, 3)
.and_hms_milli(17, 34, 33, 907)));
Some(UTC.ymd(2017, 5, 11)
.and_hms_milli(17, 11, 30, 649)));
assert!(user_public.identities.is_empty());
assert_eq!(user_public.can_create_group, true);
assert_eq!(user_public.can_create_project, true);
......
......@@ -187,6 +187,8 @@ pub struct UserPublic {
/// When the user last logged in.
pub last_sign_in_at: Option<DateTime<UTC>>,
/// When the user last made an action.
pub last_activity_on: Option<NaiveDate>,
/// When the user's account was confirmed.
pub confirmed_at: DateTime<UTC>,
/// The primary email address for the user.
......
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