Class: Ci::ProjectsController

Inherits:
ApplicationController show all
Defined in:
app/controllers/ci/projects_controller.rb

Instance Method Summary collapse

Methods inherited from ApplicationController

railtie_helpers_paths

Methods inherited from ApplicationController

#redirect_back_or_default

Methods included from PageLayoutHelper

#blank_container, #container_class, #fluid_layout, #header_title, #nav, #page_card_attributes, #page_card_meta_tags, #page_description, #page_image, #page_title, #sidebar

Methods included from GitlabRoutingHelper

#activity_project_path, #edit_project_path, #edit_project_url, #issue_path, #issue_url, #merge_request_path, #merge_request_url, #milestone_path, #project_builds_path, #project_commits_path, #project_files_path, #project_path, #project_pipelines_path, #project_snippet_url, #project_url, #runner_path, #runners_path, #toggle_subscription_path

Methods included from Gitlab::GonHelper

#add_gon_variables

Methods included from Gitlab::CurrentSettings

#current_application_settings, #fake_application_settings

Instance Method Details

#badgeObject

Project status badge Image with build status for sha or ref

This action in DEPRECATED, this is here only for backwards compatibility with projects migrated from GitLab CI.


24
25
26
27
28
29
# File 'app/controllers/ci/projects_controller.rb', line 24

def badge
  return render_404 unless @project

  image = Ci::ImageForBuildService.new.execute(@project, params)
  send_file image.path, filename: image.name, disposition: 'inline', type:"image/svg+xml"
end

#indexObject


9
10
11
# File 'app/controllers/ci/projects_controller.rb', line 9

def index
  redirect_to root_path
end

#showObject


13
14
15
16
# File 'app/controllers/ci/projects_controller.rb', line 13

def show
  # Temporary compatibility with CI badges pointing to CI project page
  redirect_to namespace_project_path(project.namespace, project)
end