/** * @param $repositoryName * @param $branchName * @param $commitTitle * @param $commitBody * @return array * @throws InvalidConfigurationException * @throws \Github\Exception\MissingArgumentException */ public function createPullRequest($repositoryName, $branchName, $commitTitle, $commitBody) { $organization = (string) Arrays::getValueByPath($this->gitHubSettings, 'origin.organization'); $this->authenticate(); $params = array('title' => $commitTitle, 'head' => sprintf('%s:%s', $this->currentUserLogin, $branchName), 'body' => $commitBody, 'base' => 'master'); return $this->gitHubClient->pullRequests()->create($organization, $repositoryName, $params); }