Skip to content

Latest commit

 

History

History
32 lines (25 loc) · 719 Bytes

File metadata and controls

32 lines (25 loc) · 719 Bytes

Tags API

Back to the navigation

Show all tags

$tags = $client->api('gitData')->tags()->all('KnpLabs', 'php-github-api');

Show a tag

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

Create a tag

$tagData = [
    'tag' => 'v0.0.1',
    'message' => 'initial version',
    'object' => 'c3d0be41ecbe669545ee3e94d31ed9a4bc91ee3c',
    'type' => 'commit',
    'tagger' => [
        'name' => 'KnpLabs',
        'email' => '[email protected]',
        'date' => '2017-06-17T14:53:35-07:00'
    ]
];

$tag = $client->api('gitData')->tags()->create('KnpLabs', 'php-github-api', $tagData);