Skip to content

Commit

Permalink
docs: Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
azu committed Feb 10, 2017
1 parent 0007008 commit f0dd10a
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ install:
script:
- npm test
after_failure:
- test $TRAVIS_PULL_REQUEST == "false" && $(npm bin)/textlint -f checkstyle README.md | reviewdog -f=checkstyle -name="textlint" -ci="travis"
- test $TRAVIS_PULL_REQUEST == "true" && $(npm bin)/textlint -f checkstyle README.md | reviewdog -f=checkstyle -name="textlint" -ci="travis"
48 changes: 47 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,56 @@ See also:

- [reviewdog — A code review dog who keeps your codebase healthy – Medium](https://medium.com/@haya14busa/reviewdog-a-code-review-dog-who-keeps-your-codebase-healthy-d957c471938b)

## Usage
## How to setup?

- [ ] Write usage instructions

### 1. Setup .travis.yml

```yaml
sudo: false
language: node_js
node_js: "stable"
env:
- REVIEWDOG_VERSION=0.9.5
install:
- mkdir -p ~/bin/ && export export PATH="~/bin/:$PATH"
- curl -fSL https://github.com/haya14busa/reviewdog/releases/download/$REVIEWDOG_VERSION/reviewdog_linux_amd64 -o ~/bin/reviewdog && chmod +x ~/bin/reviewdog
- npm install
script:
- npm test
after_failure:
- test $TRAVIS_PULL_REQUEST == "false" && $(npm bin)/textlint -f checkstyle README.md | reviewdog -f=checkstyle -name="textlint" -ci="travis"
```
See [.travis.yml](.travis.yml) for details.
### 2. Add `REVIEWDOG_GITHUB_API_TOKEN` to Travis CI Config

Get your [personal access token](https://github.com/settings/tokens/new "New personal access token").

![repo](https://monosnap.com/file/duLWpPrFoqR8uPvOZOniupuiptE1GB.png)

Set the access token to `REVIEWDOG_GITHUB_API_TOKEN`.

```
travis env set REVIEWDOG_GITHUB_API_TOKEN <YOUR_TOKEN>
```
You can check the result:
```
$ travis env list
# environment variables for azu/textlint-reviewdog-example
REVIEWDOG_GITHUB_API_TOKEN=[secure]
```
### 3. Submit PR
See Example Pull Request.
- [docs: Update README by azu · Pull Request #1 · azu/textlint-reviewdog-example](https://github.com/azu/textlint-reviewdog-example/pull/1 "docs: Update README by azu · Pull Request #1 · azu/textlint-reviewdog-example")
## Running tests
Install devDependencies and Run `npm test`:
Expand Down

0 comments on commit f0dd10a

Please sign in to comment.