* Add branch remove.

This commit is contained in:
caoyanyi
2022-08-12 16:56:58 +08:00
parent 74874aa869
commit 04780426db
3 changed files with 29 additions and 14 deletions
+15
View File
@@ -565,4 +565,19 @@ class gogsModel extends model
return $newBranches;
}
/**
* Api delete branch.
*
* @param int $gogsID
* @param string $project
* @param string $branch
* @access public
* @return void
*/
public function apiDeleteBranch($gogsID, $project, $branch)
{
$url = sprintf($this->getApiRoot($gogsID), "/repos/$project/branches/$branch");
return json_decode(commonModel::http($url, null, array(), array(), 'json', 'DELETE'));
}
}