diff --git a/src/Api/MergeRequests.php b/src/Api/MergeRequests.php index ed3779f6..ea32cac7 100644 --- a/src/Api/MergeRequests.php +++ b/src/Api/MergeRequests.php @@ -415,6 +415,29 @@ public function commits($project_id, int $mr_iid) return $this->get($this->getProjectPath($project_id, 'merge_requests/'.self::encodePath($mr_iid).'/commits')); } + /** + * @param int|string $project_id + * @param int $mr_iid + * + * @return mixed + */ + public function contextCommits($project_id, int $mr_iid) + { + return $this->get($this->getProjectPath($project_id, 'merge_requests/'.self::encodePath($mr_iid).'/context_commits')); + } + + /** + * @param int|string $project_id + * @param int $mr_iid + * @param array $params + * + * @return mixed + */ + public function addContextCommits($project_id, int $mr_iid, array $params) + { + return $this->post($this->getProjectPath($project_id, 'merge_requests/'.self::encodePath($mr_iid).'/context_commits'), $params); + } + /** * @param int|string $project_id * @param int $mr_iid