Skip to content
This repository has been archived by the owner on Mar 4, 2023. It is now read-only.

Commit

Permalink
Merge branch 'nichtich-token' into production
Browse files Browse the repository at this point in the history
  • Loading branch information
gjtorikian committed Jun 16, 2020
2 parents fd85c1f + 680380b commit 99b16a2
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,10 @@ OPTIONS

Note: this step will fail if branch protections are enabled

## Configuration

If you have `core.defaultBranch` set, the script will use that branch name as its default.

A GitHub API token can also be provided via the `GITHUB_TOKEN` environment variable.


2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 6 additions & 4 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,13 @@ class NoMoreMastersCommand extends Command {
return;
}

const token = await cli.prompt("What is your GitHub API token?", {
type: "hide",
});
const token =
process.env.GITHUB_TOKEN ||
(await cli.prompt("What is your GitHub API token?", {
type: "hide",
}));

this.log("Fetching origin...");
this.log("\nFetching origin...");
try {
await execa("git", ["fetch", "origin"]);
} catch (error) {
Expand Down

0 comments on commit 99b16a2

Please sign in to comment.