diff --git a/src/controllers/GithubController.php b/src/controllers/GithubController.php index d270ff8..426c639 100644 --- a/src/controllers/GithubController.php +++ b/src/controllers/GithubController.php @@ -103,7 +103,9 @@ public function actionRelease($version = null) public function request($method, $path, $data) { - return $this->passthru('curl', ['-X', $method, '--data', Json::encode($data), 'https://api.github.com' . $path . '?access_token=' . $this->getToken()]); + $url = 'https://api.github.com' . $path; + + return $this->passthru('curl', ['-X', $method, '-H', 'Authorization: token ' . $this->getToken(), '--data', Json::encode($data), $url]); } public function getToken()