Skip to content

Commit 41b0a9f

Browse files
committed
Add method to use generate release notes endpoint
1 parent 83b8a32 commit 41b0a9f

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

lib/Github/Api/Repository/Releases.php

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,26 @@ public function show($username, $repository, $id)
6868
return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/releases/'.$id);
6969
}
7070

71+
/**
72+
* Generate release notes content for a release.
73+
*
74+
* @param string $username
75+
* @param string $repository
76+
* @param array $params
77+
*
78+
* @throws MissingArgumentException
79+
*
80+
* @return array
81+
*/
82+
public function generateNotes($username, $repository, array $params)
83+
{
84+
if (!isset($params['tag_name'])) {
85+
throw new MissingArgumentException('tag_name');
86+
}
87+
88+
return $this->post('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/releases/generate-notes', $params);
89+
}
90+
7191
/**
7292
* Create new release in selected repository.
7393
*

0 commit comments

Comments
 (0)