Sha256: f39eacccf4f7821b1185dbb2d9c37e970d0f58cc5ff208141a706ee7cfaadcfb

Contents?: true

Size: 1.09 KB

Versions: 24

Compression:

Stored size: 1.09 KB

Contents

# frozen_string_literal: true

class Gitlab::Client
  # Defines methods related to repository submodules.
  # @see https://docs.gitlab.com/ce/api/repository_submodules.html
  module RepositorySubmodules
    # Edits an existing repository submodule.
    #
    # @example
    #   Gitlab.edit_file(42, "submodule", {
    #     branch: "branch",
    #     commit_sha: "3ddec28ea23acc5caa5d8331a6ecb2a65fc03e88",
    #     commit_message: "commit message"
    #   })
    #
    # @param  [Integer, String] project The ID or name of a project.
    # @param  [String] submodule full path of submodule to update.
    # @param  [Hash] options A customizable set of options.
    # @param  options [String] :branch the name of the branch to commit changes to.
    # @param  options [String] :commit_sha commit SHA to update the submodule to.
    # @param  options [String] :commit_message commit message text.
    # @return [Gitlab::ObjectifiedHash]
    def edit_submodule(project, submodule, options = {})
      put("/projects/#{url_encode project}/repository/submodules/#{url_encode submodule}", body: options)
    end
  end
end

Version data entries

24 entries across 24 versions & 2 rubygems

Version Path
gitlab-5.1.0 lib/gitlab/client/repository_submodules.rb
gitlab-5.0.0 lib/gitlab/client/repository_submodules.rb
gitlab-4.20.1 lib/gitlab/client/repository_submodules.rb
gitlab-4.20.0 lib/gitlab/client/repository_submodules.rb
fs-gitlab-4.19.3 lib/gitlab/client/repository_submodules.rb
fs-gitlab-4.19.2 lib/gitlab/client/repository_submodules.rb
fs-gitlab-4.19.1 lib/gitlab/client/repository_submodules.rb
gitlab-4.19.0 lib/gitlab/client/repository_submodules.rb
fs-gitlab-4.18.2 lib/gitlab/client/repository_submodules.rb
fs-gitlab-4.18.1 lib/gitlab/client/repository_submodules.rb
gitlab-4.18.0 lib/gitlab/client/repository_submodules.rb
gitlab-4.17.0 lib/gitlab/client/repository_submodules.rb
gitlab-4.16.1 lib/gitlab/client/repository_submodules.rb
gitlab-4.16.0 lib/gitlab/client/repository_submodules.rb
gitlab-4.15.0 lib/gitlab/client/repository_submodules.rb
gitlab-4.14.1 lib/gitlab/client/repository_submodules.rb
gitlab-4.14.0 lib/gitlab/client/repository_submodules.rb
gitlab-4.13.1 lib/gitlab/client/repository_submodules.rb
gitlab-4.13.0 lib/gitlab/client/repository_submodules.rb
gitlab-4.12.0 lib/gitlab/client/repository_submodules.rb