diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 74f60d2..bb4bfc5 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -124,7 +124,8 @@ This is the same set of tests that is run on our CI system, CircleCI. If your patch makes a change that would be visible or interesting to a user of SourceCred—for example, fixing a bug—please add a description of the change under the `[Unreleased]` heading of `CHANGELOG.md`. Your new -change should be the first entry in the section. +change should be the first entry in the section. The format of your +entry should be: ``` (#)```. ## When writing commit messages diff --git a/README.md b/README.md index 6ccb073..fbaf4fb 100644 --- a/README.md +++ b/README.md @@ -32,6 +32,7 @@ First, make sure that you have the following dependencies: - Install [Node] (tested on v12.x.x and v10.x.x). - Install [Yarn] (tested on v1.7.0). - Create a [GitHub API token]. No special permissions are required. + - Ensure that you have an SSH key (`id_rsa`) for `git` to use. On unix-like systems, this is usually stored in `~/.ssh/`. If you do not, you can generate one by following these [instructions](https://help.github.com/en/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent). - For macOS users: Ensure that your environment provides GNU coreutils. [See this comment for details about what, how, and why.][macos-gnu] @@ -44,27 +45,31 @@ First, make sure that you have the following dependencies: Then, run the following commands to clone and build SourceCred: -``` +```Bash git clone https://github.com/sourcecred/sourcecred.git cd sourcecred yarn install yarn backend export SOURCECRED_GITHUB_TOKEN=YOUR_GITHUB_TOKEN node bin/sourcecred.js load REPO_OWNER/REPO_NAME -# this loads sourcecred data for a particular repository -# it can take a few mins to run and will exit when finished +``` + +Loading a repo can take a few minutes. When it is finished, it will exit. Next, we can start sourcecred: + +```Bash yarn start -# then navigate to localhost:8080 in your browser ``` -For example, if you wanted to look at cred for [ipfs/js-ipfs], you could run: +Finally, we can navigate a browser window to `localhost:8080` to view generated data. -``` -$ export SOURCECRED_GITHUB_TOKEN=0000000000000000000000000000000000000000 -$ node bin/sourcecred.js load ipfs/js-ipfs -``` +#### Examples -replacing the big string of zeros with your actual token. +If you wanted to look at cred for [ipfs/js-ipfs], you could run: + +```Bash +export SOURCECRED_GITHUB_TOKEN=YOUR_GITHUB_TOKEN +node bin/sourcecred.js load ipfs/js-ipfs +``` [ipfs/js-ipfs]: https://github.com/ipfs/js-ipfs @@ -72,7 +77,7 @@ You can also combine data from multiple repositories into a single graph. To do so, pass multiple repositories to the `load` command, and specify an “output name” for the repository. For instance, the invocation -``` +```Bash node bin/sourcecred.js load ipfs/js-ipfs ipfs/go-ipfs --output ipfs/meta-ipfs ```