diff options
author | Gauvain Pocentek <gauvain@pocentek.net> | 2017-08-11 16:07:04 +0200 |
---|---|---|
committer | Gauvain Pocentek <gauvain@pocentek.net> | 2017-08-11 16:07:04 +0200 |
commit | 4057644f03829e4439ec8ab1feacf90c65d976eb (patch) | |
tree | 977658ba5109c8a3b512a882bf0a037daad754cb /docs/gl_objects/commits.py | |
parent | 80eab7b0c0682c5df99495acc4d6f71f36603cfc (diff) | |
download | gitlab-4057644f03829e4439ec8ab1feacf90c65d976eb.tar.gz |
Update the objects doc/examples for v4
Diffstat (limited to 'docs/gl_objects/commits.py')
-rw-r--r-- | docs/gl_objects/commits.py | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/docs/gl_objects/commits.py b/docs/gl_objects/commits.py index befebd5..f7e73e5 100644 --- a/docs/gl_objects/commits.py +++ b/docs/gl_objects/commits.py @@ -1,6 +1,4 @@ # list -commits = gl.project_commits.list(project_id=1) -# or commits = project.commits.list() # end list @@ -13,7 +11,8 @@ commits = project.commits.list(since='2016-01-01T00:00:00Z') # See https://docs.gitlab.com/ce/api/commits.html#create-a-commit-with-multiple-files-and-actions # for actions detail data = { - 'branch_name': 'master', + 'branch_name': 'master', # v3 + 'branch': 'master', # v4 'commit_message': 'blah blah blah', 'actions': [ { @@ -24,14 +23,10 @@ data = { ] } -commit = gl.project_commits.create(data, project_id=1) -# or commit = project.commits.create(data) # end create # get -commit = gl.project_commits.get('e3d5a71b', project_id=1) -# or commit = project.commits.get('e3d5a71b') # end get @@ -44,10 +39,6 @@ commit.cherry_pick(branch='target_branch') # end cherry # comments list -comments = gl.project_commit_comments.list(project_id=1, commit_id='master') -# or -comments = project.commit_comments.list(commit_id='a5fe4c8') -# or comments = commit.comments.list() # end comments list @@ -62,10 +53,6 @@ commit = commit.comments.create({'note': 'This is another comment', # end comments create # statuses list -statuses = gl.project_commit_statuses.list(project_id=1, commit_id='master') -# or -statuses = project.commit_statuses.list(commit_id='a5fe4c8') -# or statuses = commit.statuses.list() # end statuses list |