Commit b5fbc404 authored by Brad King's avatar Brad King 💬
Browse files

types: update for 9.4

parent f3d5b221
{"status": "success", "target_url": "https://buildbot.kitware.com/builders/rust-gitlab-megas-linux-debug/builds/41", "name": "rust-gitlab-megas-linux-debug", "author": {"username": "buildbot", "web_url": "https://gitlab.kitware.com/buildbot", "name": "buildbot", "state": "active", "avatar_url": "https://gitlab.kitware.com/uploads/system/user/avatar/35/buildbot-logo.png", "id": 35}, "finished_at": "2016-11-08T09:35:32.629-05:00", "created_at": "2016-11-08T09:35:32.627-05:00", "allow_failure": false, "sha": "de4ac3cf96cb8a0893be22b03f5171d934f9d392", "coverage": null, "started_at": null, "ref": "master", "id": 931434, "description": "expected"}
{"status": "success", "target_url": "https://buildbot.kitware.com/builders/rust-gitlab-megas-linux-debug/builds/41", "name": "rust-gitlab-megas-linux-debug", "author": {"username": "buildbot", "web_url": "https://gitlab.kitware.com/buildbot", "name": "buildbot", "state": "active", "avatar_url": "https://gitlab.kitware.com/uploads/-/system/user/avatar/35/buildbot-logo.png", "id": 35}, "finished_at": "2016-11-08T09:35:32.629-05:00", "created_at": "2016-11-08T09:35:32.627-05:00", "allow_failure": false, "sha": "de4ac3cf96cb8a0893be22b03f5171d934f9d392", "coverage": null, "started_at": null, "ref": "master", "id": 931434, "description": "expected"}
{"lfs_enabled": true, "request_access_enabled": true, "import_error": null, "only_allow_merge_if_all_discussions_are_resolved": null, "container_registry_enabled": true, "shared_runners_enabled": true, "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": {"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", "shared_with_groups": [], "description": "Rust library for communicating with a Gitlab instance.", "forks_count": 5, "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-07-20T10:48:56.344-04:00", "name": "rust-gitlab", "name_with_namespace": "Utils / rust-gitlab", "created_at": "2016-06-29T13:35:12.495-04:00", "creator_id": 13, "web_url": "https://gitlab.kitware.com/utils/rust-gitlab", "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, "import_error": null, "only_allow_merge_if_all_discussions_are_resolved": null, "container_registry_enabled": true, "shared_runners_enabled": true, "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, "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.", "forks_count": 5, "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-08-03T12:11:16.279-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, "web_url": "https://gitlab.kitware.com/utils/rust-gitlab", "permissions": {"group_access": {"notification_level": 3, "access_level": 50}, "project_access": null}, "tag_list": [], "jobs_enabled": false, "public_jobs": true}
......@@ -95,7 +95,7 @@ fn test_read_commit_status() {
assert_eq!(commit_status.author.name, "buildbot");
assert_eq!(commit_status.author.state, UserState::Active);
assert_eq!(commit_status.author.avatar_url,
"https://gitlab.kitware.com/uploads/system/user/avatar/35/buildbot-logo.png");
"https://gitlab.kitware.com/uploads/-/system/user/avatar/35/buildbot-logo.png");
assert_eq!(commit_status.author.id, UserId::new(35));
assert_eq!(commit_status.coverage, None);
}
......@@ -339,8 +339,9 @@ 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, 7, 20)
.and_hms_milli(14, 48, 56, 344));
Utc.ymd(2017, 8, 3)
.and_hms_milli(16, 11, 16, 279));
assert_eq!(project.import_error, None);
assert_eq!(project.shared_runners_enabled, true);
assert_eq!(project.lfs_enabled, true);
assert_eq!(project.creator_id, UserId::new(13));
......@@ -350,8 +351,10 @@ fn test_read_project() {
NamespaceId::Group(GroupId::new(498)));
assert_eq!(project.namespace.kind, NamespaceKind::Group);
assert_eq!(project.namespace.full_path, "utils");
assert_eq!(project.namespace.members_count_with_descendants, Some(3));
assert!(project.forked_from_project.is_none());
assert_eq!(project.avatar_url, None);
assert_eq!(project.ci_config_path, None);
assert_eq!(project.star_count, 0);
assert_eq!(project.forks_count, 5);
assert_eq!(project.open_issues_count, Some(4));
......@@ -360,6 +363,7 @@ fn test_read_project() {
assert_eq!(project.only_allow_merge_if_pipeline_succeeds, Some(false));
assert_eq!(project.only_allow_merge_if_all_discussions_are_resolved,
None);
assert_eq!(project.printing_merge_request_link_enabled, Some(true));
assert_eq!(project.request_access_enabled, true);
assert_eq!(project.jobs_enabled, false);
assert_eq!(project.issues_enabled, true);
......@@ -393,6 +397,7 @@ fn test_read_project_hook() {
assert_eq!(project_hook.issues_events, true);
assert_eq!(project_hook.merge_requests_events, true);
assert_eq!(project_hook.note_events, true);
assert_eq!(project_hook.repository_update_events, false);
assert_eq!(project_hook.enable_ssl_verification, true);
assert_eq!(project_hook.job_events, true);
assert_eq!(project_hook.pipeline_events, true);
......
......@@ -96,6 +96,7 @@ pub struct User {
/// When the account was created.
pub created_at: 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.
......@@ -169,6 +170,7 @@ pub struct UserPublic {
/// When the account was created.
pub created_at: 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.
......@@ -313,6 +315,8 @@ pub struct ProjectHook {
pub merge_requests_events: bool,
/// Whether the hook is contacted for note events.
pub note_events: bool,
/// Whether the hook is contacted for repository update events.
pub repository_update_events: bool,
/// Whether the communication with the hook is verified using TLS certificates.
pub enable_ssl_verification: bool,
/// Whether the hook is contacted for job events.
......@@ -525,6 +529,10 @@ pub struct Project {
pub forked_from_project: Option<BasicProjectDetails>,
/// The URL to the project avatar.
pub avatar_url: Option<String>,
/// The path to CI config file.
pub ci_config_path: Option<String>,
/// Description of error if project failed to import.
pub import_error: Option<String>,
/// The number of stars for the project.
pub star_count: u64,
/// The number of forks.
......@@ -541,6 +549,8 @@ pub struct Project {
pub only_allow_merge_if_pipeline_succeeds: Option<bool>,
/// Whether the project only enables the merge button if all discussions are resolved.
pub only_allow_merge_if_all_discussions_are_resolved: Option<bool>,
/// Whether to show the link to create/view merge request when pusing from command line.
pub printing_merge_request_link_enabled: Option<bool>,
/// Whether access to the project may be requested.
pub request_access_enabled: bool,
/// Whether jobs are enabled or not.
......@@ -1836,6 +1846,10 @@ pub struct Namespace {
/// The kind of the namespace.
pub kind: NamespaceKind,
pub full_path: String,
/// Number of members in the namespace and its descendants.
///
/// Only available when talking to GitLab as a user that can admin the namespace.
pub members_count_with_descendants: Option<u64>,
}
impl Namespace {
......
Supports Markdown
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