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

Merge topic 'gitlab-10.7'

8a04f4e7

 types: update for 10.7
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Merge-request: !122
parents fbf2ed10 8a04f4e7
{"downvotes": 0, "labels": [], "updated_at": "2017-07-07T02:31:03.757-04:00", "assignee": {"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}, "web_url": "https://gitlab.kitware.com/utils/rust-gitlab/issues/6", "closed_at": null, "id": 69328, "subscribed": true, "title": "fix documentation warnings", "time_stats": {"time_estimate": 0, "human_total_time_spent": null, "human_time_estimate": null, "total_time_spent": 0}, "state": "closed", "_links": {"project": "http://gitlab.kitware.com/api/v4/projects/855", "self": "http://gitlab.kitware.com/api/v4/projects/855/issues/6", "notes": "http://gitlab.kitware.com/api/v4/projects/855/issues/6/notes", "award_emoji": "http://gitlab.kitware.com/api/v4/projects/855/issues/6/award_emoji"}, "upvotes": 0, "project_id": 855, "due_date": null, "description": "", "confidential": false, "iid": 6, "milestone": null, "discussion_locked": null, "created_at": "2016-10-30T14:54:28.954-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}, "assignees": [{"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}], "user_notes_count": 0} {"downvotes": 0, "labels": [], "updated_at": "2017-07-07T02:31:03.757-04:00", "assignee": {"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}, "web_url": "https://gitlab.kitware.com/utils/rust-gitlab/issues/6", "closed_at": null, "id": 69328, "subscribed": true, "title": "fix documentation warnings", "time_stats": {"time_estimate": 0, "human_total_time_spent": null, "human_time_estimate": null, "total_time_spent": 0}, "state": "closed", "_links": {"project": "https://gitlab.kitware.com/api/v4/projects/855", "self": "https://gitlab.kitware.com/api/v4/projects/855/issues/6", "notes": "https://gitlab.kitware.com/api/v4/projects/855/issues/6/notes", "award_emoji": "https://gitlab.kitware.com/api/v4/projects/855/issues/6/award_emoji"}, "upvotes": 0, "project_id": 855, "due_date": null, "description": "", "confidential": false, "iid": 6, "milestone": null, "discussion_locked": null, "closed_by": null, "created_at": "2016-10-30T14:54:28.954-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}, "assignees": [{"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}], "user_notes_count": 0}
{"downvotes": 0, "labels": [], "updated_at": "2017-07-07T02:31:05.370-04:00", "assignee": {"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}, "web_url": "https://gitlab.kitware.com/utils/rust-gitlab/issues/5", "closed_at": null, "id": 69075, "title": "Add project hook APIs", "time_stats": {"time_estimate": 0, "human_total_time_spent": null, "human_time_estimate": null, "total_time_spent": 0}, "state": "closed", "upvotes": 0, "project_id": 855, "due_date": null, "description": "The workflow currently requires that the robot be able to register itself as a webhook for new projects. An API needs added for this.\n\nCc: @brad.king", "confidential": false, "iid": 5, "milestone": null, "discussion_locked": null, "created_at": "2016-10-04T14:59:37.178-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}, "assignees": [{"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}], "user_notes_count": 0} {"downvotes": 0, "labels": [], "updated_at": "2017-07-07T02:31:05.370-04:00", "assignee": {"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}, "web_url": "https://gitlab.kitware.com/utils/rust-gitlab/issues/5", "closed_at": null, "id": 69075, "title": "Add project hook APIs", "time_stats": {"time_estimate": 0, "human_total_time_spent": null, "human_time_estimate": null, "total_time_spent": 0}, "state": "closed", "upvotes": 0, "project_id": 855, "due_date": null, "description": "The workflow currently requires that the robot be able to register itself as a webhook for new projects. An API needs added for this.\n\nCc: @brad.king", "confidential": false, "iid": 5, "milestone": null, "discussion_locked": null, "closed_by": null, "created_at": "2016-10-04T14:59:37.178-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}, "assignees": [{"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}], "user_notes_count": 0}
{"lfs_enabled": true, "request_access_enabled": true, "forks_count": 5, "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, "id": 855, "merge_requests_enabled": true, "archived": false, "snippets_enabled": false, "http_url_to_repo": "https://gitlab.kitware.com/utils/rust-gitlab.git", "namespace": {"kind": "group", "name": "Utils", "members_count_with_descendants": 3, "parent_id": null, "path": "utils", "id": 498, "full_path": "utils"}, "star_count": 0, "avatar_url": null, "_links": {"repo_branches": "http://gitlab.kitware.com/api/v4/projects/855/repository/branches", "merge_requests": "http://gitlab.kitware.com/api/v4/projects/855/merge_requests", "self": "http://gitlab.kitware.com/api/v4/projects/855", "labels": "http://gitlab.kitware.com/api/v4/projects/855/labels", "members": "http://gitlab.kitware.com/api/v4/projects/855/members", "events": "http://gitlab.kitware.com/api/v4/projects/855/events", "issues": "http://gitlab.kitware.com/api/v4/projects/855/issues"}, "resolve_outdated_diff_discussions": null, "issues_enabled": true, "path_with_namespace": "utils/rust-gitlab", "ci_config_path": null, "shared_with_groups": [], "description": "Rust library for communicating with a Gitlab instance.", "import_error": null, "default_branch": "master", "visibility": "public", "ssh_url_to_repo": "git@gitlab.kitware.com:utils/rust-gitlab.git", "path": "rust-gitlab", "import_status": "none", "only_allow_merge_if_pipeline_succeeds": false, "open_issues_count": 4, "last_activity_at": "2017-10-05T11:18:57.875-04:00", "name": "rust-gitlab", "printing_merge_request_link_enabled": true, "name_with_namespace": "Utils / rust-gitlab", "created_at": "2016-06-29T13:35:12.495-04:00", "creator_id": 13, "shared_runners_enabled": true, "permissions": {"group_access": {"notification_level": 3, "access_level": 50}, "project_access": null}, "tag_list": [], "jobs_enabled": false, "public_jobs": true} {"lfs_enabled": true, "request_access_enabled": true, "forks_count": 5, "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, "id": 855, "merge_requests_enabled": true, "archived": false, "snippets_enabled": false, "http_url_to_repo": "https://gitlab.kitware.com/utils/rust-gitlab.git", "namespace": {"kind": "group", "name": "Utils", "members_count_with_descendants": 3, "parent_id": null, "path": "utils", "id": 498, "full_path": "utils"}, "star_count": 0, "avatar_url": null, "_links": {"repo_branches": "http://gitlab.kitware.com/api/v4/projects/855/repository/branches", "merge_requests": "http://gitlab.kitware.com/api/v4/projects/855/merge_requests", "self": "http://gitlab.kitware.com/api/v4/projects/855", "labels": "http://gitlab.kitware.com/api/v4/projects/855/labels", "members": "http://gitlab.kitware.com/api/v4/projects/855/members", "events": "http://gitlab.kitware.com/api/v4/projects/855/events", "issues": "http://gitlab.kitware.com/api/v4/projects/855/issues"}, "resolve_outdated_diff_discussions": null, "issues_enabled": true, "path_with_namespace": "utils/rust-gitlab", "ci_config_path": null, "shared_with_groups": [], "description": "Rust library for communicating with a Gitlab instance.", "import_error": null, "default_branch": "master", "visibility": "public", "ssh_url_to_repo": "git@gitlab.kitware.com:utils/rust-gitlab.git", "path": "rust-gitlab", "import_status": "none", "only_allow_merge_if_pipeline_succeeds": false, "open_issues_count": 4, "last_activity_at": "2017-10-05T11:18:57.875-04:00", "name": "rust-gitlab", "printing_merge_request_link_enabled": true, "name_with_namespace": "Utils / rust-gitlab", "created_at": "2016-06-29T13:35:12.495-04:00", "creator_id": 13, "shared_runners_enabled": true, "merge_method": "merge", "permissions": {"group_access": {"notification_level": 3, "access_level": 50}, "project_access": null}, "tag_list": [], "jobs_enabled": false, "public_jobs": true}
...@@ -117,6 +117,7 @@ fn test_read_issue() { ...@@ -117,6 +117,7 @@ fn test_read_issue() {
Utc.ymd(2017, 7, 7) Utc.ymd(2017, 7, 7)
.and_hms_milli(6, 31, 03, 757)); .and_hms_milli(6, 31, 03, 757));
assert_eq!(issue.closed_at, None); assert_eq!(issue.closed_at, None);
assert!(issue.closed_by.is_none());
assert!(issue.labels.is_empty()); assert!(issue.labels.is_empty());
assert!(issue.milestone.is_none()); assert!(issue.milestone.is_none());
assert_eq!(issue.author.username, "ben.boeckel"); assert_eq!(issue.author.username, "ben.boeckel");
...@@ -183,6 +184,7 @@ fn test_read_issue_reference() { ...@@ -183,6 +184,7 @@ fn test_read_issue_reference() {
Utc.ymd(2017, 7, 7) Utc.ymd(2017, 7, 7)
.and_hms_milli(6, 31, 5, 370)); .and_hms_milli(6, 31, 5, 370));
assert_eq!(issue.closed_at, None); assert_eq!(issue.closed_at, None);
assert!(issue.closed_by.is_none());
assert!(issue.labels.is_empty()); assert!(issue.labels.is_empty());
assert!(issue.milestone.is_none()); assert!(issue.milestone.is_none());
assert_eq!(issue.author.username, "ben.boeckel"); assert_eq!(issue.author.username, "ben.boeckel");
...@@ -394,6 +396,7 @@ fn test_read_project() { ...@@ -394,6 +396,7 @@ fn test_read_project() {
assert_eq!(project.merge_requests_enabled, true); assert_eq!(project.merge_requests_enabled, true);
assert_eq!(project.snippets_enabled, false); assert_eq!(project.snippets_enabled, false);
assert_eq!(project.wiki_enabled, true); assert_eq!(project.wiki_enabled, true);
assert_eq!(project.merge_method, Some("merge".to_string()));
if let Some(ref permissions) = project.permissions { if let Some(ref permissions) = project.permissions {
if let Some(ref group_access) = permissions.group_access { if let Some(ref group_access) = permissions.group_access {
assert_eq!(group_access.access_level, 50); assert_eq!(group_access.access_level, 50);
......
...@@ -597,6 +597,8 @@ pub struct Project { ...@@ -597,6 +597,8 @@ pub struct Project {
pub snippets_enabled: bool, pub snippets_enabled: bool,
/// Whether the project wiki is enabled or not. /// Whether the project wiki is enabled or not.
pub wiki_enabled: bool, pub wiki_enabled: bool,
/// The merge method used when merging merge request.
pub merge_method: Option<String>,
/// Statistics about the project. /// Statistics about the project.
pub statistics: Option<ProjectStatistics>, pub statistics: Option<ProjectStatistics>,
...@@ -1179,6 +1181,8 @@ pub struct Issue { ...@@ -1179,6 +1181,8 @@ pub struct Issue {
pub updated_at: DateTime<Utc>, pub updated_at: DateTime<Utc>,
/// When the issue was closed, if closed. /// When the issue was closed, if closed.
pub closed_at: Option<DateTime<Utc>>, pub closed_at: Option<DateTime<Utc>>,
/// The user that closed the issue.
pub closed_by: Option<UserBasic>,
/// The labels attached to the issue. /// The labels attached to the issue.
pub labels: Vec<String>, pub labels: Vec<String>,
/// The milestone of the issue. /// The milestone of the issue.
......
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