summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorChristian <cgumpert@users.noreply.github.com>2017-03-21 06:50:20 +0100
committerGauvain Pocentek <gauvain@pocentek.net>2017-03-21 06:50:20 +0100
commit22bf12827387cb1719bacae6c0c745cd768eee6c (patch)
tree80fd22ecc95ec6f41fb442a0ddf5d6b551822ee0 /docs
parent8677f1c0250e9ab6b1e16da17d593101128cf057 (diff)
downloadgitlab-22bf12827387cb1719bacae6c0c745cd768eee6c.tar.gz
Provide API wrapper for cherry picking commits (#236)
Diffstat (limited to 'docs')
-rw-r--r--docs/gl_objects/commits.py4
-rw-r--r--docs/gl_objects/commits.rst6
2 files changed, 10 insertions, 0 deletions
diff --git a/docs/gl_objects/commits.py b/docs/gl_objects/commits.py
index 2ed66f5..0d47edb 100644
--- a/docs/gl_objects/commits.py
+++ b/docs/gl_objects/commits.py
@@ -39,6 +39,10 @@ commit = project.commits.get('e3d5a71b')
diff = commit.diff()
# end diff
+# cherry
+commit.cherry_pick(branch='target_branch')
+# end cherry
+
# comments list
comments = gl.project_commit_comments.list(project_id=1, commit_id='master')
# or
diff --git a/docs/gl_objects/commits.rst b/docs/gl_objects/commits.rst
index 8be1b86..6fef8bf 100644
--- a/docs/gl_objects/commits.rst
+++ b/docs/gl_objects/commits.rst
@@ -43,6 +43,12 @@ Get the diff for a commit:
:start-after: # diff
:end-before: # end diff
+Cherry-pick a commit into another branch:
+
+.. literalinclude:: commits.py
+ :start-after: # cherry
+ :end-before: # end cherry
+
Commit comments
===============