Skip to content

Commit b5969a2

Browse files
committed
docs(project): add submodule docs
1 parent 4d1e377 commit b5969a2

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

docs/gl_objects/projects.rst

+9
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,15 @@ Get the content and metadata of a file for a commit, using a blob sha::
151151
content = base64.b64decode(file_info['content'])
152152
size = file_info['size']
153153

154+
Update a project submodule::
155+
156+
items = project.update_submodule(
157+
submodule="foo/bar",
158+
branch="master",
159+
commit_sha="4c3674f66071e30b3311dac9b9ccc90502a72664",
160+
commit_message="Message", # optional
161+
)
162+
154163
Get the repository archive::
155164

156165
tgz = project.repository_archive()

gitlab/v4/objects.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -3888,7 +3888,7 @@ class Project(SaveMixin, ObjectDeleteMixin, RESTObject):
38883888
@cli.register_custom_action("Project", ("submodule", "branch", "commit_sha"))
38893889
@exc.on_http_error(exc.GitlabUpdateError)
38903890
def update_submodule(self, submodule, branch, commit_sha, **kwargs):
3891-
"""Transfer a project to the given namespace ID
3891+
"""Update a project submodule
38923892
38933893
Args:
38943894
submodule (str): Full path to the submodule

0 commit comments

Comments
 (0)