Skip to content

Commit 675ff34

Browse files
committedJan 26, 2016
fixed passing github token to curl
1 parent c3c3247 commit 675ff34

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed
 

Diff for: ‎src/controllers/GithubController.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,9 @@ public function actionRelease($version = null)
103103

104104
public function request($method, $path, $data)
105105
{
106-
return $this->passthru('curl', ['-X', $method, '--data', Json::encode($data), 'https://api.github.com' . $path . '?access_token=' . $this->getToken()]);
106+
$url = 'https://api.github.com' . $path;
107+
108+
return $this->passthru('curl', ['-X', $method, '-H', 'Authorization: token ' . $this->getToken(), '--data', Json::encode($data), $url]);
107109
}
108110

109111
public function getToken()

0 commit comments

Comments
 (0)