Skip to content

Commit 0815a88

Browse files
Merge branch '9.19' into 10.0
2 parents 8dc7931 + d770318 commit 0815a88

File tree

2 files changed

+21
-11
lines changed

2 files changed

+21
-11
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ CHANGE LOG
55
## 10.0.0-RC2 (UPCOMING)
66

77
* Restored 9.x behaviour for empty JSON responses
8+
* Support the issue link link_type parameter
89

910

1011
## 10.0.0-RC1 (22/07/2020)
@@ -17,6 +18,7 @@ CHANGE LOG
1718
* Added array types where missing
1819
* Added scalar param types
1920
* Added user events API
21+
* Support the issue link link_type parameter
2022

2123

2224
## 9.18.1 (22/07/2020)

src/Api/IssueLinks.php

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,30 +18,38 @@ public function all($project_id, int $issue_iid)
1818
}
1919

2020
/**
21-
* @param int|string $source_project_id
22-
* @param int|string $source_issue_iid
21+
* @param int|string $project_id
22+
* @param int $issue_iid
2323
* @param int|string $target_project_id
24-
* @param int|string $target_issue_iid
24+
* @param int $target_issue_iid
25+
* @param array $parameters {
26+
*
27+
* @var string $link_type
28+
* }
2529
*
2630
* @return mixed
2731
*/
28-
public function create($source_project_id, $source_issue_iid, $target_project_id, $target_issue_iid)
32+
public function create($project_id, int $issue_iid, $target_project_id, int $target_issue_iid, array $parameters = [])
2933
{
30-
return $this->post($this->getProjectPath($source_project_id, 'issues/'.self::encodePath($source_issue_iid).'/links'), [
31-
'target_project_id' => $target_project_id,
32-
'target_issue_iid' => $target_issue_iid,
33-
]);
34+
$parameters['target_project_id'] = $target_project_id;
35+
$parameters['target_issue_iid'] = $target_issue_iid;
36+
37+
return $this->post($this->getProjectPath($project_id, 'issues/'.$this->encodePath($issue_iid).'/links'), $parameters);
3438
}
3539

3640
/**
3741
* @param int|string $project_id
3842
* @param int $issue_iid
39-
* @param int $issue_link_id
43+
* @param int|string $issue_link_id
44+
* @param array $parameters {
45+
*
46+
* @var string $link_type
47+
* }
4048
*
4149
* @return mixed
4250
*/
43-
public function remove($project_id, int $issue_iid, int $issue_link_id)
51+
public function remove($project_id, int $issue_iid, $issue_link_id, array $parameters = [])
4452
{
45-
return $this->delete($this->getProjectPath($project_id, 'issues/'.self::encodePath($issue_iid)).'/links/'.self::encodePath($issue_link_id));
53+
return $this->delete($this->getProjectPath($project_id, 'issues/'.$this->encodePath($issue_iid)).'/links/'.$this->encodePath($issue_link_id), $parameters);
4654
}
4755
}

0 commit comments

Comments
 (0)