summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Wittig <max.wittig@siemens.com>2019-10-06 18:06:11 +0200
committerMax Wittig <max.wittig@siemens.com>2019-10-06 18:10:40 +0200
commitb5969a2dcea77fa608cc29be7a5f39062edd3846 (patch)
treeef46305ba105ccced2ecf0e615ff177a114268b1
parent4d1e3774706f336e87ebe70e1b373ddb37f34b45 (diff)
downloadgitlab-b5969a2dcea77fa608cc29be7a5f39062edd3846.tar.gz
docs(project): add submodule docs
-rw-r--r--docs/gl_objects/projects.rst9
-rw-r--r--gitlab/v4/objects.py2
2 files changed, 10 insertions, 1 deletions
diff --git a/docs/gl_objects/projects.rst b/docs/gl_objects/projects.rst
index 85e5cb9..c0f92ae 100644
--- a/docs/gl_objects/projects.rst
+++ b/docs/gl_objects/projects.rst
@@ -151,6 +151,15 @@ Get the content and metadata of a file for a commit, using a blob sha::
content = base64.b64decode(file_info['content'])
size = file_info['size']
+Update a project submodule::
+
+ items = project.update_submodule(
+ submodule="foo/bar",
+ branch="master",
+ commit_sha="4c3674f66071e30b3311dac9b9ccc90502a72664",
+ commit_message="Message", # optional
+ )
+
Get the repository archive::
tgz = project.repository_archive()
diff --git a/gitlab/v4/objects.py b/gitlab/v4/objects.py
index cdd847f..44188c7 100644
--- a/gitlab/v4/objects.py
+++ b/gitlab/v4/objects.py
@@ -3888,7 +3888,7 @@ class Project(SaveMixin, ObjectDeleteMixin, RESTObject):
@cli.register_custom_action("Project", ("submodule", "branch", "commit_sha"))
@exc.on_http_error(exc.GitlabUpdateError)
def update_submodule(self, submodule, branch, commit_sha, **kwargs):
- """Transfer a project to the given namespace ID
+ """Update a project submodule
Args:
submodule (str): Full path to the submodule