Skip to content

Commit ace29b2

Browse files
committed
feat: Context Commits on merge requests
methods contextCommits() to list context, and addContextCommits() to append context commits
1 parent 93f0181 commit ace29b2

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

src/Api/MergeRequests.php

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -415,6 +415,29 @@ public function commits($project_id, int $mr_iid)
415415
return $this->get($this->getProjectPath($project_id, 'merge_requests/'.self::encodePath($mr_iid).'/commits'));
416416
}
417417

418+
/**
419+
* @param int|string $project_id
420+
* @param int $mr_iid
421+
*
422+
* @return mixed
423+
*/
424+
public function contextCommits($project_id, int $mr_iid)
425+
{
426+
return $this->get($this->getProjectPath($project_id, 'merge_requests/'.self::encodePath($mr_iid).'/context_commits'));
427+
}
428+
429+
/**
430+
* @param int|string $project_id
431+
* @param int $mr_iid
432+
* @param array $params
433+
*
434+
* @return mixed
435+
*/
436+
public function addContextCommits($project_id, int $mr_iid, array $params)
437+
{
438+
return $this->post($this->getProjectPath($project_id, 'merge_requests/'.self::encodePath($mr_iid).'/context_commits'), $params);
439+
}
440+
418441
/**
419442
* @param int|string $project_id
420443
* @param int $mr_iid

0 commit comments

Comments
 (0)