Method: Gitlab::Client::Projects#project_templates

Defined in:
lib/gitlab/client/projects.rb

#project_templates(project, type) ⇒ Array<Gitlab::ObjectifiedHash>

Get all project templates of a particular type

Examples:

Gitlab.project_templates(1, 'dockerfiles')
Gitlab.project_templates(1, 'licenses')

Parameters:

  • id (Integer, String)

    The ID or URL-encoded path of the project.

  • type (String)

    The type (dockerfiles|gitignores|gitlab_ci_ymls|licenses) of the template

Returns:

See Also:


603
604
605
# File 'lib/gitlab/client/projects.rb', line 603

def project_templates(project, type)
  get("/projects/#{url_encode project}/templates/#{type}")
end