From 1bc51c4e58da8b41d09858eb4df694fe31d59b89 Mon Sep 17 00:00:00 2001 From: Jeroen Thora Date: Fri, 2 Oct 2020 08:23:08 +0200 Subject: [PATCH] Remove antiope preview header as checks api is now stable --- lib/Github/Api/Repository/Checks.php | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/lib/Github/Api/Repository/Checks.php b/lib/Github/Api/Repository/Checks.php index 35724a7d112..8f63c843430 100644 --- a/lib/Github/Api/Repository/Checks.php +++ b/lib/Github/Api/Repository/Checks.php @@ -3,7 +3,6 @@ namespace Github\Api\Repository; use Github\Api\AbstractApi; -use Github\Api\AcceptHeaderTrait; use Github\Exception\MissingArgumentException; /** @@ -13,8 +12,6 @@ */ class Checks extends AbstractApi { - use AcceptHeaderTrait; - /** * @link https://developer.github.com/v3/checks/runs/#create-a-check-run * @@ -32,9 +29,6 @@ public function create($username, $repository, array $params = []) throw new MissingArgumentException(['name', 'head_sha']); } - // This api is in preview mode, so set the correct accept-header. - $this->acceptHeaderValue = 'application/vnd.github.antiope-preview+json'; - return $this->post('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/check-runs', $params); } @@ -50,9 +44,6 @@ public function create($username, $repository, array $params = []) */ public function update($username, $repository, $checkRunId, array $params = []) { - // This api is in preview mode, so set the correct accept-header. - $this->acceptHeaderValue = 'application/vnd.github.antiope-preview+json'; - return $this->patch('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/check-runs/'.rawurlencode($checkRunId), $params); } @@ -68,9 +59,6 @@ public function update($username, $repository, $checkRunId, array $params = []) */ public function all($username, $repository, $ref, $params = []) { - // This api is in preview mode, so set the correct accept-header. - $this->acceptHeaderValue = 'application/vnd.github.antiope-preview+json'; - return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/commits/'.rawurlencode($ref).'/check-runs', $params); } @@ -85,9 +73,6 @@ public function all($username, $repository, $ref, $params = []) */ public function show($username, $repository, $checkRunId) { - // This api is in preview mode, so set the correct accept-header. - $this->acceptHeaderValue = 'application/vnd.github.antiope-preview+json'; - return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/check-runs/'.rawurlencode($checkRunId)); } @@ -102,9 +87,6 @@ public function show($username, $repository, $checkRunId) */ public function annotations($username, $repository, $checkRunId) { - // This api is in preview mode, so set the correct accept-header. - $this->acceptHeaderValue = 'application/vnd.github.antiope-preview+json'; - return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/check-runs/'.rawurlencode($checkRunId).'/annotations'); } }