Skip to content

Commit 07a58d2

Browse files
authored
1 parent 41fe3ca commit 07a58d2

File tree

1 file changed

+2
-14
lines changed

1 file changed

+2
-14
lines changed

src/Api/Repositories/Workspaces/Commits.php

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class Commits extends AbstractWorkspacesApi
3131
*/
3232
public function list(array $params = [])
3333
{
34-
$uri = $this->buildCommitsUri();
34+
$uri = UriBuilder::build('repositories', $this->workspace, $this->repo, 'commits');
3535

3636
return $this->get($uri, $params);
3737
}
@@ -46,20 +46,8 @@ public function list(array $params = [])
4646
*/
4747
public function show(string $commit, array $params = [])
4848
{
49-
$uri = $this->buildCommitsUri($commit);
49+
$uri = UriBuilder::build('repositories', $this->workspace, $this->repo, 'commit', $commit);
5050

5151
return $this->get($uri, $params);
5252
}
53-
54-
/**
55-
* Build the commits URI from the given parts.
56-
*
57-
* @param string ...$parts
58-
*
59-
* @return string
60-
*/
61-
protected function buildCommitsUri(string ...$parts)
62-
{
63-
return UriBuilder::build('repositories', $this->workspace, $this->repo, 'commits', ...$parts);
64-
}
6553
}

0 commit comments

Comments
 (0)