From bdb9ae9c465e48f92fdd5605cab5bbd89f9be014 Mon Sep 17 00:00:00 2001 From: William Chargin Date: Fri, 27 Jul 2018 20:59:54 -0700 Subject: [PATCH] Demonstrate the GitHub token env var in the README (#556) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Summary: Using the environment variable is the preferred way to interact with the CLI, simply because it’s easier for users. We should demonstrate this interface instead of the legacy flag-only version. Paired with @decentralion. wchargin-branch: readme-env-var --- README.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0edd3b6..85bb61f 100644 --- a/README.md +++ b/README.md @@ -103,7 +103,8 @@ git clone https://github.com/sourcecred/sourcecred.git cd sourcecred yarn install yarn backend -node bin/sourcecred.js load REPO_OWNER REPO_NAME --github-token=GH_TOKEN +export SOURCECRED_GITHUB_TOKEN=YOUR_GITHUB_TOKEN +node bin/sourcecred.js load REPO_OWNER REPO_NAME # this loads sourcecred data for a particular repository yarn start # then navigate to localhost:3000 in your browser @@ -111,9 +112,12 @@ yarn start For example, if you wanted to look at cred for [ipfs/js-ipfs], you could run: ``` -$ node bin/sourcecred.js load ipfs js-ipfs --github-token=YOUR_GH_TOKEN +$ export SOURCECRED_GITHUB_TOKEN=0000000000000000000000000000000000000000 +$ node bin/sourcecred.js load ipfs js-ipfs ``` +replacing the big string of zeros with your actual token. + [ipfs/js-ipfs]: https://github.com/ipfs/js-ipfs ### Contributing