Skip to content

Commit

Permalink
Add method to use generate release notes endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
GuySartorelli committed Jun 20, 2022
1 parent 83b8a32 commit 41b0a9f
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions lib/Github/Api/Repository/Releases.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,26 @@ public function show($username, $repository, $id)
return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/releases/'.$id);
}

/**
* Generate release notes content for a release.
*
* @param string $username
* @param string $repository
* @param array $params
*
* @throws MissingArgumentException
*
* @return array
*/
public function generateNotes($username, $repository, array $params)
{
if (!isset($params['tag_name'])) {
throw new MissingArgumentException('tag_name');
}

return $this->post('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/releases/generate-notes', $params);
}

/**
* Create new release in selected repository.
*
Expand Down

0 comments on commit 41b0a9f

Please sign in to comment.