/** * Create a pull request for the given patch * * @param $repository * @param $patchId */ protected function createPullRequest($repository, $patchId) { $commitDetails = $this->gerritService->getCommitDetails($patchId); $commitDetails['message'] = str_replace($commitDetails['subject'], '', $commitDetails['message']); $result = $this->gitHubService->createPullRequest($repository, $patchId, $commitDetails['subject'], $commitDetails['message']); $patchUrl = $result['html_url']; $this->outputLine(sprintf('<success>Successfully opened a pull request </success><b>%s</b><success> for patch %s </success>', $patchUrl, $patchId)); }