开发者社区> 镜像站> NPM> resolve-github-refs
resolve-github-refs
Resolves all refs for a remote github repo, including heads, tags and pulls.
Last updated 7 years ago by thlorenz .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install resolve-github-refs 
SYNC missed versions from official npm registry.

resolve-github-refs build status

Resolves all refs for a remote github repo, including heads, tags and pulls.

var resolve = require('resolve-github-refs')

resolve('joyent/node', function (err, refs) {
  if (err) return console.error(err);
  console.log('The nodejs repo has %d heads, %d tags and %d pulls', refs.heads.length, refs.tags.length, refs.pulls.length);
  console.log('The latest head is "%s"', refs.heads.pop());
  console.log('The latest tag is "%s"', refs.tags.pop());
  console.log('The latest pull is "%s"', refs.pulls.pop());
})
The nodejs repo has 104 heads, 231 tags and 5257 pulls
The latest head is "v0.11.12-release"
The latest tag is "works"
The latest pull is "7394/merge

Installation

npm install resolve-github-refs

API

resolveGithubRefs(repo, cb)

Parameters:
Name Type Description
repo string

github repository of the form user/name

cb function

called back with error or all github refs (including heads, tags and pulls)

Source:

generated with docme

License

MIT

Current Tags

  • 0.1.1                                ...           latest (7 years ago)

2 Versions

  • 0.1.1                                ...           7 years ago
  • 0.1.0                                ...           7 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (2)
Dev Dependencies (1)
Dependents (1)