Skip to content

Commit

Permalink
Add GitLabRepoAdapter::removePullRequestSourceBranch()
Browse files Browse the repository at this point in the history
  • Loading branch information
phansys committed Aug 21, 2016
1 parent 1622605 commit 546945f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/ThirdParty/Gitlab/Adapter/GitLabRepoAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -259,4 +259,12 @@ public function createReleaseAssets($id, $name, $contentType, $content)
{
throw new UnsupportedOperationException('Releases are not supported by Gitlab.');
}

public function removePullRequestSourceBranch($id)
{
$api = $this->client->api('repo');
$pr = $this->getPullRequest($id);

return $api->deleteBranch($this->getCurrentProject()->id, $pr['head']['ref']);
}
}

0 comments on commit 546945f

Please sign in to comment.