From a198c481021d427a3f6c645854446ef8a9fd797e Mon Sep 17 00:00:00 2001 From: Bob Eagan Date: Mon, 27 Mar 2017 10:31:01 -0700 Subject: [PATCH] update default bodyType of Issue/Comments and Repository/Comments configure methods The default value for these are incorrect per the GitHub API documentation https://developer.github.com/v3/media/#comment-body-properties --- lib/Github/Api/Issue/Comments.php | 4 ++-- lib/Github/Api/Repository/Comments.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/Github/Api/Issue/Comments.php b/lib/Github/Api/Issue/Comments.php index c860c74d64e..410b788e388 100644 --- a/lib/Github/Api/Issue/Comments.php +++ b/lib/Github/Api/Issue/Comments.php @@ -25,8 +25,8 @@ class Comments extends AbstractApi */ public function configure($bodyType = null) { - if (!in_array($bodyType, array('raw', 'text', 'html'))) { - $bodyType = 'full'; + if (!in_array($bodyType, array('text', 'html', 'full'))) { + $bodyType = 'raw'; } $this->acceptHeaderValue = sprintf('application/vnd.github.%s.%s+json', $this->client->getApiVersion(), $bodyType); diff --git a/lib/Github/Api/Repository/Comments.php b/lib/Github/Api/Repository/Comments.php index 4e993720296..aa5a79e17f6 100644 --- a/lib/Github/Api/Repository/Comments.php +++ b/lib/Github/Api/Repository/Comments.php @@ -25,8 +25,8 @@ class Comments extends AbstractApi */ public function configure($bodyType = null) { - if (!in_array($bodyType, array('raw', 'text', 'html'))) { - $bodyType = 'full'; + if (!in_array($bodyType, array('text', 'html', 'full'))) { + $bodyType = 'raw'; } $this->acceptHeaderValue = sprintf('application/vnd.github.%s.%s+json', $this->client->getApiVersion(), $bodyType);