Giter VIP home page Giter VIP logo

ghreleases's Introduction

ghreleases

Interact with the GitHub releases API.

npm node travis david standard npm

API

list(auth, org, repo[, options], cb)

List all releases for a repo. Calls back with an array of releases.

const gh = require('ghreleases')
const auth = {
  token: '90230948aef88723eca2309880fea09789234',
  user: 'ralphtheninja'
}
gh.list(auth, 'level', 'leveldown', (err, list) => {
  console.log(list)
})

GitHub docs.

getLatest(auth, org, repo[, options], cb)

Get latest release.

gh.getLatest(auth, 'level', 'leveldown', (err, release) => {
  console.log(release)
})

GitHub docs.

getById(auth, org, repo, id[, options], cb)

Get data for a single release.

gh.getById(auth, 'level', 'leveldown', '1363866', (err, release) => {
  console.log(release)
})

GitHub docs.

getByTag(auth, org, repo, tag[, options], cb)

Get release by tag.

gh.getByTag(auth, 'level', 'leveldown', 'v1.2.2', (err, release) => {
  console.log(release)
})

GitHub docs.

create(auth, org, repo, data[, options], cb)

Create a release.

const data = {
  tag_name: '1.2.3-test',
  name: 'Release name for 1.2.3-test',
  body: 'Body text of release goes here'
}
gh.create(auth, 'level', 'leveldown', data, (err, release) => {
  console.log(release)
})

The release on GitHub would then look as follows:

1.2.3-test release

GitHub docs

uploadAssets(auth, org, repo, release, files[, options], cb)

Upload assets to a release. Calls back with an array of results for each upload request.

  • The release parameter accepts either a release id, 'latest' or a valid ref, e.g. 'tags/v1.0.0'
  • The files parameter is an array of absolute file paths that should be uploaded and associated with this release
const ref = 'tags/v1.3.0'
const files = [
  '/path/to/README.md',
  '/path/to/prebuilt/binary.tar.gz'
]
gh.uploadAssets(auth, 'level', 'leveldown', ref, files, (err, res) => {
  console.log(res)
})

GitHub docs

Also See

For interacting with other parts of the GitHub API, check out the modules below.

License

MIT

ghreleases's People

Contributors

greenkeeper[bot] avatar greenkeeperio-bot avatar jimmywarting avatar mafintosh avatar ralphtheninja avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

ghreleases's Issues

Version 10 of node.js has been released

Version 10 of Node.js (code name Dubnium) has been released! 🎊

To see what happens to your code in Node.js 10, Greenkeeper has created a branch with the following changes:

  • Added the new Node.js version to your .travis.yml
  • The new Node.js version is in-range for the engines in 1 of your package.json files, so that was left alone

If you’re interested in upgrading this repo to Node.js 10, you can open a PR with these changes. Please note that this issue is just intended as a friendly reminder and the PR as a possible starting point for getting your code running on Node.js 10.

More information on this issue

Greenkeeper has checked the engines key in any package.json file, the .nvmrc file, and the .travis.yml file, if present.

  • engines was only updated if it defined a single version, not a range.
  • .nvmrc was updated to Node.js 10
  • .travis.yml was only changed if there was a root-level node_js that didn’t already include Node.js 10, such as node or lts/*. In this case, the new version was appended to the list. We didn’t touch job or matrix configurations because these tend to be quite specific and complex, and it’s difficult to infer what the intentions were.

For many simpler .travis.yml configurations, this PR should suffice as-is, but depending on what you’re doing it may require additional work or may not be applicable at all. We’re also aware that you may have good reasons to not update to Node.js 10, which is why this was sent as an issue and not a pull request. Feel free to delete it without comment, I’m a humble robot and won’t feel rejected 🤖


FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of tape is breaking the build 🚨

The devDependency tape was updated from 4.9.2 to 4.10.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

tape is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build failed (Details).

Commits

The new version differs by 60 commits.

  • 34b1832 v4.10.0
  • 6209882 Merge all orphaned tags: 'v1.1.2', 'v2.0.2', 'v2.1.1', 'v2.2.2', 'v2.3.3', 'v2.4.3', 'v2.5.1', 'v2.6.1', 'v2.7.3', 'v2.8.1', 'v2.9.1', 'v2.10.3', 'v2.11.1', 'v2.13.4', 'v2.14.0', 'v2.14.1', 'v3.6.1'
  • 82e7b26 [Deps] update glob
  • 9e3d25e [Dev Deps] update eslint, js-yaml
  • fd807f5 v1.1.2
  • eddbff5 v2.14.1
  • 6ce09d9 Minor test tweaks due to whitespace differences in v2 vs v4.
  • 71af8ba gitignore node_modules
  • 4c0d9e6 Merge pull request #268 from ljharb/throws_non_function_should_fail
  • d0a675f v3.6.1
  • d22b5fc Minor test tweaks due to output differences in v1 vs v4.
  • 8b3c1b7 Add missing concat-stream devDep
  • 3495543 gitignore node_modules
  • db81846 Merge pull request #268 from ljharb/throws_non_function_should_fail
  • 7ed6651 Minor test tweaks due to whitespace differences in v3 vs v4.

There are 60 commits in total.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Use native Object.assign instead of xtend

xtend can easily be replaced with Object.assign

This reduce the dependencies and possible also avoid duplicated versions where some package don't use the same version range for the xtend package

// immutable
Object.assign({}, a, b)

// mutable
Object.assign(a, b)

x

dd

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.