Skip to content

Latest commit

 

History

History
45 lines (28 loc) · 1.12 KB

File metadata and controls

45 lines (28 loc) · 1.12 KB
.. module:: github2.commits

Commit

Note

See the official GitHub API v2 documentation for commits.

.. autoclass:: Commit(type)

.. autoclass:: Commits(type)

Examples

Listing Commits on a Branch

>>> commits = github.commits.list("mojombo/grit", "master")

By default the first page of results is returned, you can return further results with the page parameter:

>>> commits = github.commits.list("mojombo/grit", "master", page=2)

Listing Commits for a File

>>> commits = github.commits.list("mojombo/grit", "master",
...                               file="grit.gemspec")

Showing a Specific Commit

>>> commit = github.commits.show("mojombo/grit",
...             sha="5071bf9fbfb81778c456d62e111440fdc776f76c")