Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

github-pr-release

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github-pr-release - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

LICENSE

4

lib/github-client.js

@@ -88,2 +88,6 @@ var request = require('request')

} else if (res.statusCode === 422) {
var errMessage = res.body.errors[0].message
if (!errMessage.match(/pull request already exists/)) {
return Promise.reject(new Error(errMessage))
}
return self.get(self.pullRequestEndpoint(), {

@@ -90,0 +94,0 @@ base: self.base,

2

package.json
{
"name": "github-pr-release",
"version": "1.1.0",
"version": "1.1.1",
"description": "Create a release pull request by Github API",

@@ -5,0 +5,0 @@ "main": "index.js",

# github-pr-release
[![Build Status](https://travis-ci.org/uiureo/github-pr-release.svg)](https://travis-ci.org/uiureo/github-pr-release)
[![](https://img.shields.io/npm/v/github-pr-release.svg)](https://www.npmjs.com/package/github-pr-release)
Create a release pull request by using Github API. In fact, this is a Node.js port of [git-pr-release]( https://github.com/motemen/git-pr-release).
Create a release pull request by using Github API. Inspired by [git-pr-release]( https://github.com/motemen/git-pr-release).

@@ -59,2 +60,5 @@ * No dependency on git. You can easily deploy it to Heroku etc.

)
.catch((err) ->
msg.send("Create release PR failed: " + err.message)
)
```

@@ -61,0 +65,0 @@

@@ -41,3 +41,13 @@ /* global describe before it */

.post('/repos/uiureo/awesome-app/pulls')
.reply(422)
.reply(422, {
message: 'Validation Failed',
errors: [
{
resource: 'PullRequest',
code: 'custom',
message: 'A pull request already exists for uiureo:master.'
}
],
documentation_url: 'https://developer.github.com/v3/pulls/#create-a-pull-request'
})

@@ -58,2 +68,25 @@ nock('https://api.github.com/')

})
describe('when no changes between head and base', function () {
nock('https://api.github.com/')
.post('/repos/uiureo/awesome-app/pulls')
.reply(422, {
message: 'Validation Failed',
errors: [
{
resource: 'PullRequest',
code: 'custom',
message: 'No commits between production and master'
}
],
documentation_url: 'https://developer.github.com/v3/pulls/#create-a-pull-request'
})
it('rejects with error message', function (done) {
this.client.prepareReleasePR().catch(function (error) {
assert(error.message === 'No commits between production and master')
done()
})
})
})
})

@@ -60,0 +93,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc