@@ -55,4 +55,56 @@ public function update($username, $repository, $checkRunId, array $params = [])
5555
5656 return $ this ->patch ('/repos/ ' .rawurlencode ($ username ).'/ ' .rawurlencode ($ repository ).'/check-runs/ ' .rawurlencode ($ checkRunId ), $ params );
5757 }
58+
59+ /**
60+ * @link https://developer.github.com/v3/checks/runs/#list-check-runs-for-a-git-reference
61+ *
62+ * @param string $username
63+ * @param string $repository
64+ * @param string $ref
65+ * @param array $params
66+ *
67+ * @return array
68+ */
69+ public function all ($ username , $ repository , $ ref , $ params = [])
70+ {
71+ // This api is in preview mode, so set the correct accept-header.
72+ $ this ->acceptHeaderValue = 'application/vnd.github.antiope-preview+json ' ;
73+
74+ return $ this ->patch ('/repos/ ' .rawurlencode ($ username ).'/ ' .rawurlencode ($ repository ).'/commits/ ' .rawurlencode ($ ref ).'/check-runs ' , $ params );
75+ }
76+
77+ /**
78+ * @link https://developer.github.com/v3/checks/runs/#get-a-check-run
79+ *
80+ * @param string $username
81+ * @param string $repository
82+ * @param string $checkRunId
83+ *
84+ * @return array
85+ */
86+ public function show ($ username , $ repository , $ checkRunId )
87+ {
88+ // This api is in preview mode, so set the correct accept-header.
89+ $ this ->acceptHeaderValue = 'application/vnd.github.antiope-preview+json ' ;
90+
91+ return $ this ->patch ('/repos/ ' .rawurlencode ($ username ).'/ ' .rawurlencode ($ repository ).'/check-runs/ ' .rawurlencode ($ checkRunId ));
92+ }
93+
94+ /**
95+ * @link https://developer.github.com/v3/checks/runs/#list-check-run-annotations
96+ *
97+ * @param string $username
98+ * @param string $repository
99+ * @param string $checkRunId
100+ *
101+ * @return array
102+ */
103+ public function annotations ($ username , $ repository , $ checkRunId )
104+ {
105+ // This api is in preview mode, so set the correct accept-header.
106+ $ this ->acceptHeaderValue = 'application/vnd.github.antiope-preview+json ' ;
107+
108+ return $ this ->patch ('/repos/ ' .rawurlencode ($ username ).'/ ' .rawurlencode ($ repository ).'/check-runs/ ' .rawurlencode ($ checkRunId ).'/annotations ' );
109+ }
58110}
0 commit comments