Skip to content

Commit

Permalink
Merge 2189529 into 879544e
Browse files Browse the repository at this point in the history
  • Loading branch information
eiriksm committed Jul 5, 2019
2 parents 879544e + 2189529 commit 0e3c2a8
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/Providers/Gitlab.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,13 +113,17 @@ public function createPullRequest($user_name, $user_repo, $params)
/** @var MergeRequests $mr */
$mr = $this->client->api('mr');
$assignee = null;
if (!empty($params['assignees'][0])) {
$assignee = $params['assignees'][0];
}
$data = $mr->create($this->getProjectId($user_name, $user_repo), $params['head'], $params['base'], $params['title'], $assignee, null, $params['body']);
if (!empty($data['web_url'])) {
$data['html_url'] = $data['web_url'];
}
// Try to update with assignees.
if (!empty($params['assignees'])) {
$new_data = [
'assignee_ids' => $params['assignees'],
];
$mr->update($this->getProjectId($user_name, $user_repo), $data["iid"], $new_data);
}
return $data;
}

Expand Down

0 comments on commit 0e3c2a8

Please sign in to comment.