diff options
| author | Gauvain Pocentek <gauvain@pocentek.net> | 2017-01-21 16:54:16 +0100 |
|---|---|---|
| committer | Gauvain Pocentek <gauvain@pocentek.net> | 2017-01-21 17:04:00 +0100 |
| commit | ee666fd57e5cb100b6e195bb74228ac242d8932a (patch) | |
| tree | 58ad29ae3a7f0c113a76f2b04e0767445f3e83d5 /docs/gl_objects/commits.rst | |
| parent | 04435e1b13166fb45216c494f3af4d9bdb76bcaf (diff) | |
| download | gitlab-ee666fd57e5cb100b6e195bb74228ac242d8932a.tar.gz | |
Add support for commit creation
Fixes #206
Diffstat (limited to 'docs/gl_objects/commits.rst')
| -rw-r--r-- | docs/gl_objects/commits.rst | 31 |
1 files changed, 17 insertions, 14 deletions
diff --git a/docs/gl_objects/commits.rst b/docs/gl_objects/commits.rst index 5a43597..8be1b86 100644 --- a/docs/gl_objects/commits.rst +++ b/docs/gl_objects/commits.rst @@ -5,10 +5,9 @@ Commits Commits ======= -Use :class:`~gitlab.objects.ProjectCommit` objects to manipulate commits. The -:attr:`gitlab.Gitlab.project_commits` and -:attr:`gitlab.objects.Project.commits` manager objects provide helper -functions. +* Object class: :class:`~gitlab.objects.ProjectCommit` +* Manager objects: :attr:`gitlab.Gitlab.project_commits`, + :attr:`gitlab.objects.Project.commits` Examples -------- @@ -26,6 +25,12 @@ results: :start-after: # filter list :end-before: # end filter list +Create a commit: + +.. literalinclude:: commits.py + :start-after: # create + :end-before: # end create + Get a commit detail: .. literalinclude:: commits.py @@ -41,11 +46,10 @@ Get the diff for a commit: Commit comments =============== -Use :class:`~gitlab.objects.ProjectCommitStatus` objects to manipulate commits. The -:attr:`gitlab.Gitlab.project_commit_comments` and -:attr:`gitlab.objects.Project.commit_comments` and -:attr:`gitlab.objects.ProjectCommit.comments` manager objects provide helper -functions. +* Object class: :class:`~gitlab.objects.ProjectCommiComment` +* Manager objects: :attr:`gitlab.Gitlab.project_commit_comments`, + :attr:`gitlab.objects.Project.commit_comments`, + :attr:`gitlab.objects.ProjectCommit.comments` Examples -------- @@ -65,11 +69,10 @@ Add a comment on a commit: Commit status ============= -Use :class:`~gitlab.objects.ProjectCommitStatus` objects to manipulate commits. -The :attr:`gitlab.Gitlab.project_commit_statuses`, -:attr:`gitlab.objects.Project.commit_statuses` and -:attr:`gitlab.objects.ProjectCommit.statuses` manager objects provide helper -functions. +* Object class: :class:`~gitlab.objects.ProjectCommitStatus` +* Manager objects: :attr:`gitlab.Gitlab.project_commit_statuses`, + :attr:`gitlab.objects.Project.commit_statuses`, + :attr:`gitlab.objects.ProjectCommit.statuses` Examples -------- |
