Skip to content

Added developer setup instructions #574

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 8, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,3 +94,33 @@ npm install github-api
[npm-package]: https://www.npmjs.com/package/github-api/
[unpkg]: https://unpkg.com/github-api/
[travis-ci]: https://travis-ci.org/github-tools/github

## Contributing

We welcome contributions of all types! This section will guide you through setting up your development environment.

### Setup

1. [Install Node](https://nodejs.org/en/) version 8,10 or 11. It can often help to use a Node version switcher such as [NVM](https://github.com/nvm-sh/nvm).
2. Fork this repo to your GitHub account.
3. Clone the fork to your development machine (`git clone https://github.com/{YOUR_USERNAME}/github`).
4. From the root of the cloned repo, run `npm install`.
5. Email jaredrewerts@gmail.com with the subject **GitHub API - Personal Access Token Request**

A personal access token for our test user, @github-tools-test, will be generated for you.

6. Set the environment variable `GHTOOLS_USER` to `github-tools-test`.

`export GHTOOLS_USER=github-tools-test`

7. Set the environment variable `GHTOOLS_PASSWORD` to the personal access token that was generated for you.

`export GHTOOLS_PASSWORD={YOUR_PAT}`

**NOTE** Windows users can use [this guide](http://www.dowdandassociates.com/blog/content/howto-set-an-environment-variable-in-windows-command-line-and-registry/) to learn about setting environment variables on Windows.

### Tests

The main way we write code for `github-api` is using test-driven development. We use Mocha to run our tests. Given that the bulk of this library is just interacting with GitHub's API, nearly all of our tests are integration tests.

To run the test suite, run `npm run test`.