An update will be applied December 9th, between 12PM and 1:00PM EST (UTC -5:00). The site may be slow during that time.

Commit 3e56d983 authored by Ben Boeckel's avatar Ben Boeckel
Browse files

types: update for 8.13 changes

Fixes-from: Makoto NAKASHIMA <makoto.nksm@gmail.com>
parent 3e24a679
......@@ -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 8.11.0 API and will likely aggressively track new
The API is based off of the 8.13.0 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..
......
......@@ -98,6 +98,8 @@ pub struct User {
pub twitter: String,
/// Custom URL for the user's website.
pub website_url: String,
/// Organization the user belongs to.
pub organization: Option<String>,
}
impl From<User> for UserBasic {
......@@ -162,6 +164,8 @@ pub struct UserFull {
pub twitter: String,
/// Custom URL for the user's website.
pub website_url: String,
/// Organization the user belongs to.
pub organization: Option<String>,
/// When the user last logged in.
pub last_sign_in_at: Option<DateTime<UTC>>,
......@@ -226,6 +230,7 @@ impl From<UserFull> for User {
linkedin: user.linkedin,
twitter: user.twitter,
website_url: user.website_url,
organization: user.organization,
}
}
}
......@@ -256,6 +261,12 @@ pub struct Hook {
pub url: String,
/// When the hook was created.
pub created_at: DateTime<UTC>,
/// Whether the hook is contacted for push events.
pub push_events: bool,
/// Whether the hook is contacted for tag push events.
pub tag_push_events: bool,
/// Whether the communication with the hook is verified using TLS certificates.
pub enable_ssl_verification: bool,
}
#[derive(Serialize, Deserialize, Debug)]
......@@ -271,6 +282,8 @@ pub struct ProjectHook {
pub project_id: ProjectId,
/// Whether the hook is contacted for push events.
pub push_events: bool,
/// Whether the hook is contacted for tag push events.
pub tag_push_events: bool,
/// Whether the hook is contacted for issue events.
pub issues_events: bool,
/// Whether the hook is contacted for merge request events.
......@@ -293,6 +306,9 @@ impl From<ProjectHook> for Hook {
id: hook.id,
url: hook.url,
created_at: hook.created_at,
push_events: hook.push_events,
tag_push_events: hook.tag_push_events,
enable_ssl_verification: hook.enable_ssl_verification,
}
}
}
......@@ -1396,15 +1412,34 @@ impl Namespace {
// end
//end
//class Label < Grape::Entity
// expose :name, :color, :description
//class LabelBasic < Grape::Entity
// expose :id, :name, :color, :description
//end
//class Label < LabelBasic
// expose :open_issues_count, :closed_issues_count, :open_merge_requests_count
// expose :priority do |label, options|
// label.priority(options[:project])
// end
// expose :subscribed do |label, options|
// label.subscribed?(options[:current_user])
// end
//end
//class List < Grape::Entity
// expose :id
// expose :label, using Entities::LabelBasic
// expose :position
//end
//class Board < Grape::Entity
// expose :id
// expose :lists, using: Entities::List do |board|
// board.lists.destroyable
// end
//end
//class Compare < Grape::Entity
// expose :commit, using: Entities::RepoCommit do |compare, options|
// Commit.decorate(compare.commits, nil).last
......@@ -1458,6 +1493,9 @@ impl Namespace {
// expose :after_sign_out_path
// expose :container_registry_token_expire_delay
// expose :repository_storage
// expose :repository_storages
// expose :koding_enabled
// expose :koding_url
//end
//class Release < Grape::Entity
......@@ -1469,7 +1507,7 @@ impl Namespace {
// expose :name, :message
// expose :commit do |repo_tag, options|
// options[:project].repository.commit(repo_tag.target)
// options[:project].repository.commit(repo_tag.dereferenced_target)
// end
// expose :release, using: Entities::Release do |repo_tag, options|
......@@ -1521,6 +1559,7 @@ impl_id!(BuildId);
// expose :artifacts_file, using: BuildArtifactFile, if: -> (build, opts) { build.artifacts? }
// expose :commit, with: RepoCommit
// expose :runner, with: Runner
// expose :pipeline, with: PipelineBasic
//end
//class Trigger < Grape::Entity
......@@ -1596,8 +1635,12 @@ impl_id!(BuildId);
// expose :created_at
//end
//class PipelineBasic < Grape::Entity
// expose :id, :ref, :sha, :status
//end
//class Pipeline < Grape::Entity
// expose :id, :status, :ref, :sha, :before_sha, :tag, :yaml_errors
// expose :before_sha, :tag, :yaml_errors
// expose :user, with: Entities::UserBasic
// expose :created_at, :updated_at, :started_at, :finished_at, :committed_at
......
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