Skip to content

Commit

Permalink
Use proper access token in update scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
swalkinshaw committed Sep 12, 2021
1 parent c2ca2c4 commit b2629d6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions bin/update-repo.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ function run($cmd) {
}

function getGitRemote() {
$githubToken = getenv('GITHUB_TOKEN');
$githubToken = getenv('GITHUB_ROOTS_BOT_ACCESS_TOKEN');
if (!isGithubToken($githubToken)) {
throw new \RuntimeException("refusing to proceed with possibly invalid GITHUB TOKEN $githubToken");
throw new \RuntimeException("refusing to proceed with possibly invalid GITHUB_ROOTS_BOT_ACCESS_TOKEN $githubToken");
}
return "https://$githubToken@github.com/roots/wordpress.git";
}
Expand Down
2 changes: 1 addition & 1 deletion bin/update-wp-releases.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function apiGET($url, $params = [])

// Optional Authentication:
$githubUsername = getenv('GITHUB_USERNAME');
$githubToken = getenv('GITHUB_TOKEN');
$githubToken = getenv('GITHUB_ROOTS_BOT_ACCESS_TOKEN');
if ($githubUsername && $githubToken) {
curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
curl_setopt($curl, CURLOPT_USERPWD, "${githubUsername}:${githubToken}");
Expand Down

0 comments on commit b2629d6

Please sign in to comment.