13
13
*/
14
14
class Checks extends AbstractApi
15
15
{
16
- use AcceptHeaderTrait;
17
-
18
16
/**
19
17
* @link https://developer.github.com/v3/checks/runs/#create-a-check-run
20
18
*
@@ -32,9 +30,6 @@ public function create($username, $repository, array $params = [])
32
30
throw new MissingArgumentException (['name ' , 'head_sha ' ]);
33
31
}
34
32
35
- // This api is in preview mode, so set the correct accept-header.
36
- $ this ->acceptHeaderValue = 'application/vnd.github.antiope-preview+json ' ;
37
-
38
33
return $ this ->post ('/repos/ ' .rawurlencode ($ username ).'/ ' .rawurlencode ($ repository ).'/check-runs ' , $ params );
39
34
}
40
35
@@ -50,9 +45,6 @@ public function create($username, $repository, array $params = [])
50
45
*/
51
46
public function update ($ username , $ repository , $ checkRunId , array $ params = [])
52
47
{
53
- // This api is in preview mode, so set the correct accept-header.
54
- $ this ->acceptHeaderValue = 'application/vnd.github.antiope-preview+json ' ;
55
-
56
48
return $ this ->patch ('/repos/ ' .rawurlencode ($ username ).'/ ' .rawurlencode ($ repository ).'/check-runs/ ' .rawurlencode ($ checkRunId ), $ params );
57
49
}
58
50
@@ -68,9 +60,6 @@ public function update($username, $repository, $checkRunId, array $params = [])
68
60
*/
69
61
public function all ($ username , $ repository , $ ref , $ params = [])
70
62
{
71
- // This api is in preview mode, so set the correct accept-header.
72
- $ this ->acceptHeaderValue = 'application/vnd.github.antiope-preview+json ' ;
73
-
74
63
return $ this ->get ('/repos/ ' .rawurlencode ($ username ).'/ ' .rawurlencode ($ repository ).'/commits/ ' .rawurlencode ($ ref ).'/check-runs ' , $ params );
75
64
}
76
65
@@ -85,9 +74,6 @@ public function all($username, $repository, $ref, $params = [])
85
74
*/
86
75
public function show ($ username , $ repository , $ checkRunId )
87
76
{
88
- // This api is in preview mode, so set the correct accept-header.
89
- $ this ->acceptHeaderValue = 'application/vnd.github.antiope-preview+json ' ;
90
-
91
77
return $ this ->get ('/repos/ ' .rawurlencode ($ username ).'/ ' .rawurlencode ($ repository ).'/check-runs/ ' .rawurlencode ($ checkRunId ));
92
78
}
93
79
@@ -102,9 +88,6 @@ public function show($username, $repository, $checkRunId)
102
88
*/
103
89
public function annotations ($ username , $ repository , $ checkRunId )
104
90
{
105
- // This api is in preview mode, so set the correct accept-header.
106
- $ this ->acceptHeaderValue = 'application/vnd.github.antiope-preview+json ' ;
107
-
108
91
return $ this ->get ('/repos/ ' .rawurlencode ($ username ).'/ ' .rawurlencode ($ repository ).'/check-runs/ ' .rawurlencode ($ checkRunId ).'/annotations ' );
109
92
}
110
93
}
0 commit comments