Skip to content
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* toolbag removed.
* Checking that github url exists before trying to extract user and repo
* Stars, forks and watches are now assigned 0 instead of an empty string if repo.* is empty
* Sample data added to Readme.

## 10 April - 6.2.0

Expand Down
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,25 @@ all available variable names.
- Change the registry used to validate the module name.
- Defaults to `http://registry.npmjs.org/`.

## Sample Data
```json
{
"entity$": "-\/-\/github_cache",
"name": "fuge",
"user": "apparatus",
"repo": "fuge",
"stars": 155,
"watches": 15,
"forks": 18,
"last": "2016-04-09T21:57:45Z",
"urlRepo": "https:\/\/github.com\/apparatus\/fuge",
"urlClone": "git+https:\/\/github.com\/apparatus\/fuge.git",
"urlSsh": "git@github.com:apparatus\/fuge.git",
"pullRequests": 1,
"cached": 1461229347738
}
```

## Messages Handled
This micro-service handles the following messages.

Expand Down
4 changes: 2 additions & 2 deletions lib/github.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,13 @@ function cmdGet (msg, done) {
}

if (!params.user || !params.repo) {
return done(new Error('not found on npm'))
return done(new Error('not found on github'))
}

queryGithub(params, done)
}
else{
return done(new Error('not found on npm'))
return done(new Error('not found on github'))
}
})
})
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"start": "node srv/start.js",
"isolated": "GITHUB_ISOLATED=true node srv/start.js",
"lint": "lab -P test -dL",
"test": "lab -m 5000 -t 75 -v -P test",
"test": "lab -v -P test -L -c -t 64",
"cov": "lab -s -P test -r lcov | coveralls"
},
"main": "lib/github.js",
Expand Down Expand Up @@ -35,6 +35,7 @@
"license": "MIT",
"dependencies": {
"github4": "0.5.4",
"proxyquire": "1.7.4",
"request": "2.70.0",
"seneca": "2.0.0",
"seneca-balance-client": "0.4.0",
Expand Down