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