Commit.rst
1 Commit 2 ====== 3 4 Create commit status check 5 -------------------------- 6 7 .. code-block:: python 8 9 # sha -> commit on which the status check will be created 10 # For example, for a webhook payload 11 # sha = data["pull_request"]["head"]["sha"] 12 repo.get_commit(sha=sha).create_status( 13 state="pending", 14 target_url="https://FooCI.com", 15 description="FooCI is building", 16 context="ci/FooCI" 17 ) 18 19 Get commit date 20 -------------------------- 21 22 .. code-block:: python 23 24 >>> commit = repo.get_commit(sha=sha) 25 >>> print(commit.commit.author.date) 26 2018-10-11 03:04:52 27 >>> print(commit.commit.committer.date) 28 2018-10-11 03:04:52