X Tutup
Skip to content

Latest commit

 

History

History
144 lines (97 loc) · 2.93 KB

File metadata and controls

144 lines (97 loc) · 2.93 KB

Commits

Commits

Reference

Warning

Pagination starts at page 0 in v3, but starts at page 1 in v4 (like all the v4 endpoints).

Examples

List the commits for a project:

.. literalinclude:: commits.py
   :start-after: # list
   :end-before: # end list

You can use the ref_name, since and until filters to limit the results:

.. literalinclude:: commits.py
   :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
   :start-after: # get
   :end-before: # end get

Get the diff for a commit:

.. literalinclude:: commits.py
   :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

Reference

Examples

Get the comments for a commit:

.. literalinclude:: commits.py
   :start-after: # comments list
   :end-before: # end comments list

Add a comment on a commit:

.. literalinclude:: commits.py
   :start-after: # comments create
   :end-before: # end comments create

Commit status

Reference

Examples

Get the statuses for a commit:

.. literalinclude:: commits.py
   :start-after: # statuses list
   :end-before: # end statuses list

Change the status of a commit:

.. literalinclude:: commits.py
   :start-after: # statuses set
   :end-before: # end statuses set
X Tutup