Commit 8042322d authored by Ben Boeckel's avatar Ben Boeckel
Browse files

types: remove commented out entities

parent 06356d86
......@@ -996,19 +996,6 @@ pub struct ProjectSnippet {
pub web_url: String,
}
//class PersonalSnippet < Grape::Entity
// expose :id, :title, :file_name
// expose :author, using: Entities::UserBasic
// expose :updated_at, :created_at
//
// expose :web_url do |snippet|
// Gitlab::UrlBuilder.build(snippet)
// end
// expose :raw_url do |snippet|
// Gitlab::UrlBuilder.build(snippet) + "/raw"
// end
//end
// This is just used as a common "base class" in Ruby.
//#[cfg_attr(feature="strict", serde(deny_unknown_fields))]
//#[derive(Serialize, Deserialize, Debug, Clone)]
......@@ -1815,10 +1802,6 @@ impl Event {
}
}
//class ProjectGroupLink < Grape::Entity
// expose :id, :project_id, :group_id, :group_access
//end
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
/// The kinds of namespaces supported by Gitlab.
pub enum NamespaceKind {
......@@ -1864,144 +1847,6 @@ impl Namespace {
}
}
//class ProjectService < Grape::Entity
// expose :id, :title, :created_at, :updated_at, :active
// expose :push_events, :issues_events, :merge_requests_events
// expose :tag_push_events, :note_events, :build_events, :pipeline_events
// # Expose serialized properties
// expose :properties do |service, options|
// field_names = service.fields.
// select { |field| options[:include_passwords] || field[:type] != 'password' }.
// map { |field| field[:name] }
// service.properties.slice(*field_names)
// end
//end
//class NotificationSetting < Grape::Entity
// expose :level
// expose :events, if: ->(notification_setting, _) { notification_setting.custom? } do
// ::NotificationSetting::EMAIL_EVENTS.each do |event|
// expose event
// end
// end
//end
//class GlobalNotificationSetting < NotificationSetting
// expose :notification_email do |notification_setting, options|
// notification_setting.user.notification_email
// end
//end
//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
// end
// expose :commits, using: Entities::RepoCommit do |compare, options|
// Commit.decorate(compare.commits, nil)
// end
// expose :diffs, using: Entities::RepoDiff do |compare, options|
// compare.diffs(all_diffs: true).to_a
// end
// expose :compare_timeout do |compare, options|
// compare.diffs.overflow?
// end
// expose :same, as: :compare_same_ref
//end
//class Contributor < Grape::Entity
// expose :name, :email, :commits, :additions, :deletions
//end
//class BroadcastMessage < Grape::Entity
// expose :message, :starts_at, :ends_at, :color, :font
//end
//class ApplicationSetting < Grape::Entity
// expose :id
// expose :default_projects_limit
// expose :signup_enabled
// expose :signin_enabled
// expose :gravatar_enabled
// expose :sign_in_text
// expose :after_sign_up_text
// expose :created_at
// expose :updated_at
// expose :home_page_url
// expose :default_branch_protection
// expose :restricted_visibility_levels
// expose :max_attachment_size
// expose :session_expire_delay
// expose :default_project_visibility
// expose :default_snippet_visibility
// expose :default_group_visibility
// expose :domain_whitelist
// expose :domain_blacklist_enabled
// expose :domain_blacklist
// expose :user_oauth_applications
// expose :after_sign_out_path
// expose :container_registry_token_expire_delay
// expose :repository_storage
// expose :repository_storages
// expose :koding_enabled
// expose :koding_url
// expose :plantuml_enabled
// expose :plantuml_url
// expose :terminal_max_session_time
//end
//class Release < Grape::Entity
// expose :tag, as: :tag_name
// expose :description
//end
//class RepoTag < Grape::Entity
// expose :name, :message
// expose :commit do |repo_tag, options|
// options[:project].repository.commit(repo_tag.dereferenced_target)
// end
// expose :release, using: Entities::Release do |repo_tag, options|
// options[:project].releases.find_by(tag: repo_tag.name)
// end
//end
//class TriggerRequest < Grape::Entity
// expose :id, :variables
//end
#[cfg_attr(feature="strict", serde(deny_unknown_fields))]
#[derive(Serialize, Deserialize, Debug, Clone, Copy, PartialEq, Eq)]
/// Type-safe runner ID.
......@@ -2024,22 +1869,6 @@ pub struct Runner {
pub name: Option<String>,
}
//class RunnerDetails < Runner
// expose :tag_list
// expose :run_untagged
// expose :locked
// expose :version, :revision, :platform, :architecture
// expose :contacted_at
// expose :token, if: lambda { |runner, options| options[:current_user].is_admin? || !runner.is_shared? }
// expose :projects, with: Entities::BasicProjectDetails do |runner, options|
// if options[:current_user].is_admin?
// runner.projects
// else
// options[:current_user].authorized_projects.where(id: runner.projects)
// end
// end
//end
#[cfg_attr(feature="strict", serde(deny_unknown_fields))]
#[derive(Serialize, Deserialize, Debug, Clone)]
/// An uploaded artifact from a build.
......@@ -2090,79 +1919,6 @@ pub struct Build {
pub pipeline: PipelineBasic,
}
//class Trigger < Grape::Entity
// expose :token, :created_at, :updated_at, :deleted_at, :last_used
//end
//class Variable < Grape::Entity
// expose :key, :value
//end
//class EnvironmentBasic < Grape::Entity
// expose :id, :name, :slug, :external_url
//end
//class Environment < EnvironmentBasic
// expose :project, using: Entities::Project
//end
//class Deployment < Grape::Entity
// expose :id, :iid, :ref, :sha, :created_at
// expose :user, using: Entities::UserBasic
// expose :environment, using: Entities::EnvironmentBasic
// expose :deployable, using: Entities::Build
//end
//class RepoLicense < Grape::Entity
// expose :key, :name, :nickname
// expose :featured, as: :popular
// expose :url, as: :html_url
// expose(:source_url) { |license| license.meta['source'] }
// expose(:description) { |license| license.meta['description'] }
// expose(:conditions) { |license| license.meta['conditions'] }
// expose(:permissions) { |license| license.meta['permissions'] }
// expose(:limitations) { |license| license.meta['limitations'] }
// expose :content
//end
//class TemplatesList < Grape::Entity
// expose :name
//end
//class Template < Grape::Entity
// expose :name, :content
//end
//class BroadcastMessage < Grape::Entity
// expose :id, :message, :starts_at, :ends_at, :color, :font
// expose :active?, as: :active
//end
//class Todo < Grape::Entity
// expose :id
// expose :project, using: Entities::BasicProjectDetails
// expose :author, using: Entities::UserBasic
// expose :action_name
// expose :target_type
// expose :target do |todo, options|
// Entities.const_get(todo.target_type).represent(todo.target, options)
// end
// expose :target_url do |todo, options|
// target_type = todo.target_type.underscore
// target_url = "namespace_project_#{target_type}_url"
// target_anchor = "note_#{todo.note_id}" if todo.note_id?
// Gitlab::Application.routes.url_helpers.public_send(target_url,
// todo.project.namespace, todo.project, todo.target, anchor: target_anchor)
// end
// expose :body
// expose :state
// expose :created_at
//end
#[cfg_attr(feature="strict", serde(deny_unknown_fields))]
#[derive(Serialize, Deserialize, Debug, Clone, Copy, PartialEq, Eq)]
/// Type-safe pipeline ID.
......@@ -2183,25 +1939,3 @@ pub struct PipelineBasic {
/// The status of the pipeline.
pub status: StatusState,
}
//class Pipeline < Grape::Entity
// expose :before_sha, :tag, :yaml_errors
// expose :user, with: Entities::UserBasic
// expose :created_at, :updated_at, :started_at, :finished_at, :committed_at
// expose :duration
// expose :coverage
//end
//class MergeRequestDiff < Grape::Entity
// expose :id, :head_commit_sha, :base_commit_sha, :start_commit_sha,
// :created_at, :merge_request_id, :state, :real_size
//end
//class MergeRequestDiffFull < MergeRequestDiff
// expose :commits, using: Entities::RepoCommit
// expose :diffs, using: Entities::RepoDiff do |compare, _|
// compare.diffs(all_diffs: true).to_a
// end
//end
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