@@ -12,20 +12,15 @@ class CheckRuns extends AbstractApi
12
12
{
13
13
use AcceptHeaderTrait;
14
14
15
- public function configure ()
16
- {
17
- $ this ->acceptHeaderValue = 'application/vnd.github.antiope-preview+json ' ;
18
-
19
- return $ this ;
20
- }
21
-
22
15
/**
23
16
* @link https://docs.github.com/en/free-pro-team@latest/rest/reference/checks#create-a-check-run
24
17
*
25
18
* @return array
26
19
*/
27
20
public function create (string $ username , string $ repository , array $ params = [])
28
21
{
22
+ $ this ->acceptHeaderValue = 'application/vnd.github.antiope-preview+json ' ;
23
+
29
24
return $ this ->post ('/repos/ ' .rawurlencode ($ username ).'/ ' .rawurlencode ($ repository ).'/check-runs ' , $ params );
30
25
}
31
26
@@ -36,6 +31,8 @@ public function create(string $username, string $repository, array $params = [])
36
31
*/
37
32
public function show (string $ username , string $ repository , int $ checkRunId )
38
33
{
34
+ $ this ->acceptHeaderValue = 'application/vnd.github.antiope-preview+json ' ;
35
+
39
36
return $ this ->get ('/repos/ ' .rawurlencode ($ username ).'/ ' .rawurlencode ($ repository ).'/check-runs/ ' .$ checkRunId );
40
37
}
41
38
@@ -46,6 +43,8 @@ public function show(string $username, string $repository, int $checkRunId)
46
43
*/
47
44
public function update (string $ username , string $ repository , int $ checkRunId , array $ params = [])
48
45
{
46
+ $ this ->acceptHeaderValue = 'application/vnd.github.antiope-preview+json ' ;
47
+
49
48
return $ this ->patch ('/repos/ ' .rawurlencode ($ username ).'/ ' .rawurlencode ($ repository ).'/check-runs/ ' .$ checkRunId , $ params );
50
49
}
51
50
@@ -56,6 +55,8 @@ public function update(string $username, string $repository, int $checkRunId, ar
56
55
*/
57
56
public function annotations (string $ username , string $ repository , int $ checkRunId )
58
57
{
58
+ $ this ->acceptHeaderValue = 'application/vnd.github.antiope-preview+json ' ;
59
+
59
60
return $ this ->get ('/repos/ ' .rawurlencode ($ username ).'/ ' .rawurlencode ($ repository ).'/check-runs/ ' .$ checkRunId .'/annotations ' );
60
61
}
61
62
@@ -66,6 +67,8 @@ public function annotations(string $username, string $repository, int $checkRunI
66
67
*/
67
68
public function allForCheckSuite (string $ username , string $ repository , int $ checkSuiteId , array $ params = [])
68
69
{
70
+ $ this ->acceptHeaderValue = 'application/vnd.github.antiope-preview+json ' ;
71
+
69
72
return $ this ->get ('/repos/ ' .rawurlencode ($ username ).'/ ' .rawurlencode ($ repository ).'/check-suites/ ' .$ checkSuiteId .'/check-runs ' , $ params );
70
73
}
71
74
@@ -76,6 +79,8 @@ public function allForCheckSuite(string $username, string $repository, int $chec
76
79
*/
77
80
public function allForReference (string $ username , string $ repository , string $ ref , array $ params = [])
78
81
{
82
+ $ this ->acceptHeaderValue = 'application/vnd.github.antiope-preview+json ' ;
83
+
79
84
return $ this ->get ('/repos/ ' .rawurlencode ($ username ).'/ ' .rawurlencode ($ repository ).'/commits/ ' .rawurlencode ($ ref ).'/check-runs ' , $ params );
80
85
}
81
86
}
0 commit comments