Module: Gitlab::Client::RepositorySubmodules

Included in:
Gitlab::Client
Defined in:
lib/gitlab/client/repository_submodules.rb

Overview

Defines methods related to repository submodules.

Instance Method Summary collapse

Instance Method Details

#edit_submodule(project, submodule, options = {}) ⇒ Gitlab::ObjectifiedHash

Edits an existing repository submodule.

Examples:

Gitlab.edit_file(42, "submodule", {
  branch: "branch",
  commit_sha: "3ddec28ea23acc5caa5d8331a6ecb2a65fc03e88",
  commit_message: "commit message"
})

Parameters:

  • project (Integer, String)

    The ID or name of a project.

  • submodule (String)

    full path of submodule to update.

  • options (Hash) (defaults to: {})

    A customizable set of options.

  • options (String) (defaults to: {})

    :branch the name of the branch to commit changes to.

  • options (String) (defaults to: {})

    :commit_sha commit SHA to update the submodule to.

  • options (String) (defaults to: {})

    :commit_message commit message text.

Returns:



23
24
25
# File 'lib/gitlab/client/repository_submodules.rb', line 23

def edit_submodule(project, submodule, options = {})
  put("/projects/#{url_encode project}/repository/submodules/#{url_encode submodule}", body: options)
end