php-github-api/doc/gitdata/commits.md at master · KnpLabs/php-github-api · GitHub
Skip to content

Latest commit

 

History

History
15 lines (11 loc) · 447 Bytes

commits.md

File metadata and controls

15 lines (11 loc) · 447 Bytes

Commits API

Back to the navigation

Show a commit

$commit = $client->api('gitData')->commits()->show('KnpLabs', 'php-github-api', '839e5185da9434753db47959bee16642bb4f2ce4');

Create a commit

$commitData = ['message' => 'Upgrading documentation', 'tree' => $treeSHA, 'parents' => [$parentCommitSHA]];
$commit = $client->api('gitData')->commits()->create('KnpLabs', 'php-github-api', $commitData);