github-pr-release
Create a release pull request by using Github API. In fact, this is a Node.js port of git-pr-release.
- No dependency on git. You can easily deploy it to Heroku etc.
- Fast because it uses only Github API.
Usage
release(config)
Create a release pull request and return Promise.
You must pass a config as an argument.
var release = require('github-pr-release')
var config = {
token: 'your github token',
owner: 'uiureo',
repo: 'awesome-web-app',
head: 'master',
base: 'production'
}
release(config).then(function (pullRequest) {
})
pullRequest
is an object that github api returns.
See: https://developer.github.com/v3/pulls/#get-a-single-pull-request
Pull request titles
If one of pull requests of which consist a release pull request has a title like "Bump to v1.0", the title of the release pull request becomes "Release v1.0". Otherwise, it uses timestamps like "Release 2000-01-01 00:00:00" in local timezone.
Install
npm install github-pr-release
Example
hubot
release = require('github-pr-release')
module.exports = (robot) ->
robot.respond /release/i, (msg) ->
release(config).then((pullRequest) ->
msg.send pullRequest.html_url
)
License
MIT