33namespace Github \Api \Repository ;
44
55use Github \Api \AbstractApi ;
6- use Github \Api \AcceptHeaderTrait ;
76use Github \Exception \MissingArgumentException ;
87
98/**
1312 */
1413class Checks extends AbstractApi
1514{
16- use AcceptHeaderTrait;
17-
1815 /**
1916 * @link https://developer.github.com/v3/checks/runs/#create-a-check-run
2017 *
@@ -32,9 +29,6 @@ public function create($username, $repository, array $params = [])
3229 throw new MissingArgumentException (['name ' , 'head_sha ' ]);
3330 }
3431
35- // This api is in preview mode, so set the correct accept-header.
36- $ this ->acceptHeaderValue = 'application/vnd.github.antiope-preview+json ' ;
37-
3832 return $ this ->post ('/repos/ ' .rawurlencode ($ username ).'/ ' .rawurlencode ($ repository ).'/check-runs ' , $ params );
3933 }
4034
@@ -50,9 +44,6 @@ public function create($username, $repository, array $params = [])
5044 */
5145 public function update ($ username , $ repository , $ checkRunId , array $ params = [])
5246 {
53- // This api is in preview mode, so set the correct accept-header.
54- $ this ->acceptHeaderValue = 'application/vnd.github.antiope-preview+json ' ;
55-
5647 return $ this ->patch ('/repos/ ' .rawurlencode ($ username ).'/ ' .rawurlencode ($ repository ).'/check-runs/ ' .rawurlencode ($ checkRunId ), $ params );
5748 }
5849
@@ -68,9 +59,6 @@ public function update($username, $repository, $checkRunId, array $params = [])
6859 */
6960 public function all ($ username , $ repository , $ ref , $ params = [])
7061 {
71- // This api is in preview mode, so set the correct accept-header.
72- $ this ->acceptHeaderValue = 'application/vnd.github.antiope-preview+json ' ;
73-
7462 return $ this ->get ('/repos/ ' .rawurlencode ($ username ).'/ ' .rawurlencode ($ repository ).'/commits/ ' .rawurlencode ($ ref ).'/check-runs ' , $ params );
7563 }
7664
@@ -85,9 +73,6 @@ public function all($username, $repository, $ref, $params = [])
8573 */
8674 public function show ($ username , $ repository , $ checkRunId )
8775 {
88- // This api is in preview mode, so set the correct accept-header.
89- $ this ->acceptHeaderValue = 'application/vnd.github.antiope-preview+json ' ;
90-
9176 return $ this ->get ('/repos/ ' .rawurlencode ($ username ).'/ ' .rawurlencode ($ repository ).'/check-runs/ ' .rawurlencode ($ checkRunId ));
9277 }
9378
@@ -102,9 +87,6 @@ public function show($username, $repository, $checkRunId)
10287 */
10388 public function annotations ($ username , $ repository , $ checkRunId )
10489 {
105- // This api is in preview mode, so set the correct accept-header.
106- $ this ->acceptHeaderValue = 'application/vnd.github.antiope-preview+json ' ;
107-
10890 return $ this ->get ('/repos/ ' .rawurlencode ($ username ).'/ ' .rawurlencode ($ repository ).'/check-runs/ ' .rawurlencode ($ checkRunId ).'/annotations ' );
10991 }
11092}
0 commit comments