@@ -12,20 +12,15 @@ class CheckRuns extends AbstractApi
1212{
1313 use AcceptHeaderTrait;
1414
15- public function configure ()
16- {
17- $ this ->acceptHeaderValue = 'application/vnd.github.antiope-preview+json ' ;
18-
19- return $ this ;
20- }
21-
2215 /**
2316 * @link https://docs.github.com/en/free-pro-team@latest/rest/reference/checks#create-a-check-run
2417 *
2518 * @return array
2619 */
2720 public function create (string $ username , string $ repository , array $ params = [])
2821 {
22+ $ this ->acceptHeaderValue = 'application/vnd.github.antiope-preview+json ' ;
23+
2924 return $ this ->post ('/repos/ ' .rawurlencode ($ username ).'/ ' .rawurlencode ($ repository ).'/check-runs ' , $ params );
3025 }
3126
@@ -36,6 +31,8 @@ public function create(string $username, string $repository, array $params = [])
3631 */
3732 public function show (string $ username , string $ repository , int $ checkRunId )
3833 {
34+ $ this ->acceptHeaderValue = 'application/vnd.github.antiope-preview+json ' ;
35+
3936 return $ this ->get ('/repos/ ' .rawurlencode ($ username ).'/ ' .rawurlencode ($ repository ).'/check-runs/ ' .$ checkRunId );
4037 }
4138
@@ -46,6 +43,8 @@ public function show(string $username, string $repository, int $checkRunId)
4643 */
4744 public function update (string $ username , string $ repository , int $ checkRunId , array $ params = [])
4845 {
46+ $ this ->acceptHeaderValue = 'application/vnd.github.antiope-preview+json ' ;
47+
4948 return $ this ->patch ('/repos/ ' .rawurlencode ($ username ).'/ ' .rawurlencode ($ repository ).'/check-runs/ ' .$ checkRunId , $ params );
5049 }
5150
@@ -56,6 +55,8 @@ public function update(string $username, string $repository, int $checkRunId, ar
5655 */
5756 public function annotations (string $ username , string $ repository , int $ checkRunId )
5857 {
58+ $ this ->acceptHeaderValue = 'application/vnd.github.antiope-preview+json ' ;
59+
5960 return $ this ->get ('/repos/ ' .rawurlencode ($ username ).'/ ' .rawurlencode ($ repository ).'/check-runs/ ' .$ checkRunId .'/annotations ' );
6061 }
6162
@@ -66,6 +67,8 @@ public function annotations(string $username, string $repository, int $checkRunI
6667 */
6768 public function allForCheckSuite (string $ username , string $ repository , int $ checkSuiteId , array $ params = [])
6869 {
70+ $ this ->acceptHeaderValue = 'application/vnd.github.antiope-preview+json ' ;
71+
6972 return $ this ->get ('/repos/ ' .rawurlencode ($ username ).'/ ' .rawurlencode ($ repository ).'/check-suites/ ' .$ checkSuiteId .'/check-runs ' , $ params );
7073 }
7174
@@ -76,6 +79,8 @@ public function allForCheckSuite(string $username, string $repository, int $chec
7679 */
7780 public function allForReference (string $ username , string $ repository , string $ ref , array $ params = [])
7881 {
82+ $ this ->acceptHeaderValue = 'application/vnd.github.antiope-preview+json ' ;
83+
7984 return $ this ->get ('/repos/ ' .rawurlencode ($ username ).'/ ' .rawurlencode ($ repository ).'/commits/ ' .rawurlencode ($ ref ).'/check-runs ' , $ params );
8085 }
8186}
0 commit comments