diff options
Diffstat (limited to 'lib/api/lint.rb')
-rw-r--r-- | lib/api/lint.rb | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/lib/api/lint.rb b/lib/api/lint.rb index dee04b6bb00..71965fc05c9 100644 --- a/lib/api/lint.rb +++ b/lib/api/lint.rb @@ -4,34 +4,6 @@ module API class Lint < ::API::Base feature_category :pipeline_composition - helpers do - def can_lint_ci? - signup_unrestricted = Gitlab::CurrentSettings.signup_enabled? && !Gitlab::CurrentSettings.signup_limited? - internal_user = current_user.present? && !current_user.external? - is_developer = current_user.present? && current_user.projects.any? { |p| p.member?(current_user, Gitlab::Access::DEVELOPER) } - - signup_unrestricted || internal_user || is_developer - end - end - - namespace :ci do - desc 'REMOVED: Validates the .gitlab-ci.yml content' do - detail 'Checks if CI/CD YAML configuration is valid' - success code: 200, model: Entities::Ci::Lint::Result - tags %w[ci_lint] - end - params do - requires :content, type: String, desc: 'The CI/CD configuration content' - optional :include_merged_yaml, type: Boolean, desc: 'If the expanded CI/CD configuration should be included in the response' - optional :include_jobs, type: Boolean, desc: 'If the list of jobs should be included in the response. This is - false by default' - end - - post '/lint', urgency: :low do - render_api_error!('410 Gone', 410) - end - end - resource :projects, requirements: API::NAMESPACE_OR_PROJECT_REQUIREMENTS do desc 'Validates a CI YAML configuration with a namespace' do detail 'Checks if a project’s latest (HEAD of the project’s default branch) .gitlab-ci.yml configuration is |