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

types: Organize project feature-enabled fields

parent 51d75852
...@@ -536,12 +536,14 @@ fn test_read_project() { ...@@ -536,12 +536,14 @@ fn test_read_project() {
); );
assert_eq!(project.printing_merge_request_link_enabled, Some(true)); assert_eq!(project.printing_merge_request_link_enabled, Some(true));
assert_eq!(project.request_access_enabled, true); assert_eq!(project.request_access_enabled, true);
assert_eq!(project.jobs_enabled, false);
assert_eq!(project.resolve_outdated_diff_discussions, None); assert_eq!(project.resolve_outdated_diff_discussions, None);
assert_eq!(project.jobs_enabled, false);
assert_eq!(project.issues_enabled, true); assert_eq!(project.issues_enabled, true);
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())); 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 {
......
...@@ -613,11 +613,12 @@ pub struct Project { ...@@ -613,11 +613,12 @@ pub struct Project {
pub printing_merge_request_link_enabled: Option<bool>, pub printing_merge_request_link_enabled: Option<bool>,
/// Whether access to the project may be requested. /// Whether access to the project may be requested.
pub request_access_enabled: bool, pub request_access_enabled: bool,
/// Whether jobs are enabled or not.
pub jobs_enabled: bool,
/// Whether to automatically resolve merge request diff discussions when they become outdated, /// Whether to automatically resolve merge request diff discussions when they become outdated,
/// if configured. /// if configured.
pub resolve_outdated_diff_discussions: Option<bool>, pub resolve_outdated_diff_discussions: Option<bool>,
/// Whether jobs are enabled or not.
pub jobs_enabled: bool,
/// Whether issues are enabled or not. /// Whether issues are enabled or not.
pub issues_enabled: bool, pub issues_enabled: bool,
/// Whether merge requests are enabled or not. /// Whether merge requests are enabled or not.
...@@ -626,6 +627,7 @@ pub struct Project { ...@@ -626,6 +627,7 @@ 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. /// The merge method used when merging merge request.
pub merge_method: Option<String>, pub merge_method: Option<String>,
/// Statistics about the project. /// Statistics about the project.
......
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