module Gitlab::Client::RemoteMirrors

def create_remote_mirror(project, url, options = {})

Returns:
  • (Gitlab::ObjectifiedHash) -

Options Hash: (**options)
  • :keep_divergent_refs (Boolean) -- Determines if divergent refs are skipped.
  • :only_protected_branches (Boolean) -- Determines if only protected branches are mirrored.
  • :enabled (Boolean) -- Determines if the mirror is enabled.

Parameters:
  • options (Hash) -- A customizable set of options.
  • url (String) -- The full URL of the remote repository.
  • project (Integer, String) -- The ID or name of a project.
def create_remote_mirror(project, url, options = {})
  post("/projects/#{url_encode project}/remote_mirrors", body: options.merge(url: url))
end

def edit_remote_mirror(project, id, options = {})

Returns:
  • (Gitlab::ObjectifiedHash) -

Options Hash: (**options)
  • :keep_divergent_refs (Boolean) -- Determines if divergent refs are skipped.
  • :only_protected_branches (Boolean) -- Determines if only protected branches are mirrored.
  • :enabled (Boolean) -- Determines if the mirror is enabled.

Parameters:
  • options (Hash) -- A customizable set of options.
  • id (Integer) -- The ID of the remote mirror.
  • project (Integer, String) -- The ID or name of a project.
def edit_remote_mirror(project, id, options = {})
  put("/projects/#{url_encode project}/remote_mirrors/#{id}", body: options)
end

def remote_mirrors(project)

Returns:
  • (Array) -

Parameters:
  • project (Integer, String) -- The ID or name of a project.
def remote_mirrors(project)
  get("/projects/#{url_encode project}/remote_mirrors")
end