lib/gitlab/client/repositories.rb in gitlab-3.6.1 vs lib/gitlab/client/repositories.rb in gitlab-3.7.0

- old
+ new

@@ -1,40 +1,9 @@ class Gitlab::Client # Defines methods related to repositories. # @see https://github.com/gitlabhq/gitlabhq/blob/master/doc/api/repositories.md module Repositories - # Gets a list of project repository tags. - # - # @example - # Gitlab.tags(42) - # - # @param [Integer] project The ID of a project. - # @param [Hash] options A customizable set of options. - # @option options [Integer] :page The page number. - # @option options [Integer] :per_page The number of results per page. - # @return [Array<Gitlab::ObjectifiedHash>] - def tags(project, options={}) - get("/projects/#{project}/repository/tags", query: options) - end - alias_method :repo_tags, :tags - - # Creates a new project repository tag. - # - # @example - # Gitlab.create_tag(42, 'new_tag', 'master') - # Gitlab.create_tag(42, 'v1.0', 'master', 'Release 1.0') - # - # @param [Integer] project The ID of a project. - # @param [String] tag_name The name of the new tag. - # @param [String] ref The ref (commit sha, branch name, or another tag) the tag will point to. - # @param [String] message Optional message for tag, creates annotated tag if specified. - # @return [Gitlab::ObjectifiedHash] - def create_tag(project, tag_name, ref, message='') - post("/projects/#{project}/repository/tags", body: { tag_name: tag_name, ref: ref, message: message }) - end - alias_method :repo_create_tag, :create_tag - # Get the contents of a file # # @example # Gitlab.file_contents(42, 'Gemfile') # Gitlab.repo_file_contents(3, 'Gemfile', 'ed899a2f4b50b4370feeea94676502b42383c746') @@ -54,10 +23,10 @@ # Get file tree project (root level). # # @example # Gitlab.tree(42) - # Gitlab.tree(42, path: "Gemfile") + # Gitlab.tree(42, { path: 'Gemfile' }) # # @param [Integer] project The ID of a project. # @param [Hash] options A customizable set of options. # @option options [String] :path The path inside repository. # @option options [String] :ref_name The name of a repository branch or tag.