Skip to content

Commit 8e441b5

Browse files
mlhessm1guelpf
authored andcommitted
add a method to pull refs (tags and branches) for a given commit
1 parent bcb52c5 commit 8e441b5

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

lib/Gitlab/Api/Repositories.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,16 @@ public function commit($project_id, $sha)
176176
return $this->get($this->getProjectPath($project_id, 'repository/commits/'.$this->encodePath($sha)));
177177
}
178178

179+
/**
180+
* @param int $project_id
181+
* @param $sha
182+
* @return mixed
183+
*/
184+
public function commitrefs($project_id, $sha)
185+
{
186+
return $this->get($this->getProjectPath($project_id, 'repository/commits/'.$this->encodePath($sha) . '/refs'));
187+
}
188+
179189
/**
180190
* @param int $project_id
181191
* @param array $parameters (

0 commit comments

Comments
 (0)