Commit fdae599c authored by Brad King's avatar Brad King
Browse files

types: update for 12.0

Projects gained a field indicating whether they have an empty repo.
Issues gained a field indicating whether there is an empty task list.

Issues and MRs also gained a field for task completion, but we leave
that unimplemented for now.
parent 10c48a4f
......@@ -39,6 +39,7 @@
"discussion_locked": null,
"downvotes": 0,
"due_date": null,
"has_tasks": false,
"id": 69328,
"iid": 6,
"labels": [],
......@@ -47,6 +48,10 @@
"project_id": 855,
"state": "closed",
"subscribed": true,
"task_completion_status": {
"completed_count": 0,
"count": 0
},
"time_stats": {
"human_time_estimate": null,
"human_total_time_spent": null,
......
......@@ -40,6 +40,10 @@
"milestone": null,
"project_id": 855,
"state": "closed",
"task_completion_status": {
"completed_count": 0,
"count": 0
},
"time_stats": {
"human_time_estimate": null,
"human_total_time_spent": null,
......
......@@ -97,6 +97,10 @@
"subscribed": true,
"target_branch": "master",
"target_project_id": 855,
"task_completion_status": {
"completed_count": 0,
"count": 0
},
"time_stats": {
"human_time_estimate": null,
"human_total_time_spent": null,
......
......@@ -11,11 +11,13 @@
"archived": false,
"avatar_url": null,
"ci_config_path": null,
"ci_default_git_depth": null,
"container_registry_enabled": true,
"created_at": "2016-06-29T13:35:12.495-04:00",
"creator_id": 13,
"default_branch": "master",
"description": "Rust library for communicating with a Gitlab instance.",
"empty_repo": false,
"external_authorization_classification_label": null,
"forks_count": 7,
"http_url_to_repo": "https://gitlab.kitware.com/utils/rust-gitlab.git",
......
......@@ -202,6 +202,7 @@ fn test_read_issue() {
assert_eq!(issue.upvotes, 0);
assert_eq!(issue.downvotes, 0);
assert_eq!(issue.due_date, None);
assert_eq!(issue.has_tasks, Some(false));
assert_eq!(issue.confidential, false);
assert_eq!(issue.discussion_locked, None);
assert_eq!(
......@@ -472,6 +473,7 @@ fn test_read_project() {
assert_eq!(project.default_branch, Some("master".to_string()));
assert!(project.tag_list.is_empty());
assert_eq!(project.archived, false);
assert_eq!(project.empty_repo, false);
assert_eq!(project.visibility, VisibilityLevel::Public);
assert_eq!(
project.ssh_url_to_repo,
......
......@@ -546,6 +546,8 @@ pub struct Project {
pub tag_list: Vec<String>,
/// Whether the project is archived or not.
pub archived: bool,
/// Whether the project has an empty repository or not.
pub empty_repo: bool,
/// Whether the project is public, internal, or private.
pub visibility: VisibilityLevel,
/// The URL to clone the repository over SSH.
......@@ -1404,6 +1406,9 @@ pub struct Issue {
pub downvotes: u64,
/// When the issue is due.
pub due_date: Option<NaiveDate>,
/// Whether the issue is has a non-empty task list.
/// GitLab does not include this in issue references.
pub has_tasks: Option<bool>,
/// Whether the issue is confidential or not.
pub confidential: bool,
/// Whether the discussion has been locked.
......@@ -1451,6 +1456,7 @@ impl Issue {
upvotes: 0,
downvotes: 0,
due_date: None,
has_tasks: None,
confidential: false,
discussion_locked: None,
web_url: "".to_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