File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,34 @@ public function all($username, $repository)
25
25
return $ this ->get ('/repos/ ' .rawurlencode ($ username ).'/ ' .rawurlencode ($ repository ).'/git/refs ' );
26
26
}
27
27
28
+ /**
29
+ * Get all matching references for a particular branch of a repository.
30
+ *
31
+ * @param string $username
32
+ * @param string $repository
33
+ * @param string $branch
34
+ *
35
+ * @return array
36
+ */
37
+ public function matchingBranch ($ username , $ repository , $ branch )
38
+ {
39
+ return $ this ->get ('/repos/ ' .rawurlencode ($ username ).'/ ' .rawurlencode ($ repository ).'/git/matching-refs/heads/ ' .$ branch );
40
+ }
41
+
42
+ /**
43
+ * Get all matching references for a particular branch of a repository.
44
+ *
45
+ * @param string $username
46
+ * @param string $repository
47
+ * @param string $tag
48
+ *
49
+ * @return array
50
+ */
51
+ public function matchingTag ($ username , $ repository , $ tag )
52
+ {
53
+ return $ this ->get ('/repos/ ' .rawurlencode ($ username ).'/ ' .rawurlencode ($ repository ).'/git/matching-refs/tags/ ' .$ tag );
54
+ }
55
+
28
56
/**
29
57
* Get all branches of a repository.
30
58
*
You can’t perform that action at this time.
0 commit comments