Skip to content

Commit

Permalink
fixed passing github token to curl
Browse files Browse the repository at this point in the history
  • Loading branch information
hiqsol committed Jan 26, 2016
1 parent c3c3247 commit 675ff34
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/controllers/GithubController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 675ff34

Please sign in to comment.