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

@dog-ai/github-wrapper

Package Overview
Dependencies
Maintainers
1
Versions
91
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dog-ai/github-wrapper - npm Package Compare versions

Comparing version 1.1.3 to 1.1.4

lib/index.js

53

lib/github-wrapper.js

@@ -123,31 +123,36 @@ 'use strict';

return this.getOrgRepos(owner).mapSeries(function (repo) {
var name = repo.name;
var mergeGreenkeeperPullRequest = function mergeGreenkeeperPullRequest(owner, repoName, pullRequest) {
var isGreenkeeper = pullRequest.user.login === 'greenkeeper[bot]';
var isSuccess = pullRequest.combinedStatus[0].state === 'success';
var statuses = pullRequest.combinedStatus[0].statuses;
var isVerified = _.find(statuses, { context: 'greenkeeper/verify', state: 'success' });
return _this3.getRepoPullRequestsByState(owner, name, 'open').mapSeries(function (pullRequest) {
var isGreenkeeper = pullRequest.user.login === 'greenkeeper[bot]';
var isSuccess = pullRequest.combinedStatus[0].state === 'success';
var statuses = pullRequest.combinedStatus[0].statuses;
var isVerified = _.find(statuses, { context: 'greenkeeper/verify', state: 'success' });
if (isGreenkeeper && isSuccess && isVerified) {
var number = pullRequest.number;
var sha = pullRequest.sha;
if (isGreenkeeper && isSuccess && isVerified) {
var number = pullRequest.number;
var sha = pullRequest.sha;
return _this3.mergePullRequest(owner, name, number, sha).then(function () {
return mergedPullRequests.push({ owner: owner, name: name, number: number, sha: sha, success: true });
}).catch(function (error) {
return mergedPullRequests.push({
owner: owner,
name: name,
number: number,
sha: sha,
success: false,
error: error
});
return _this3.mergePullRequest(owner, repoName, number, sha).then(function () {
return mergedPullRequests.push({ owner: owner, repoName: repoName, number: number, sha: sha, success: true });
}).catch(function (error) {
return mergedPullRequests.push({
owner: owner,
repoName: repoName,
number: number,
sha: sha,
success: false,
error: error
});
}
});
}
};
return this.getOrgRepos(owner).mapSeries(function (repo) {
var repoName = repo.name;
return _this3.getRepoPullRequestsByState(owner, repoName, 'open').mapSeries(function (pullRequest) {
return mergeGreenkeeperPullRequest(owner, repoName, pullRequest);
}).catch(function () {});
}).catch(function () {}).finally(function () {
}).then(function () {
return mergedPullRequests;
});
}).catch(function () {});
}

@@ -154,0 +159,0 @@ }]);

{
"name": "@dog-ai/github-wrapper",
"description": "A GitHub wrapper library",
"version": "1.1.3",
"main": "lib/github-wrapper.js",
"version": "1.1.4",
"main": "lib/index.js",
"repository": {

@@ -38,3 +38,3 @@ "type": "git",

"standard": "9.0.0-beta.0",
"testdouble": "1.11.1"
"testdouble": "2.1.2"
},

@@ -41,0 +41,0 @@ "config": {

@@ -6,3 +6,2 @@ # A GitHub wrapper library

[![Coverage Status](https://coveralls.io/repos/github/dog-ai/github-wrapper/badge.svg?branch=master)](https://coveralls.io/github/dog-ai/github-wrapper?branch=master)
[![Greenkeeper badge](https://badges.greenkeeper.io/dog-ai/github-wrapper.svg)](https://greenkeeper.io/)
[![](https://img.shields.io/github/release/dog-ai/github-wrapper.svg)](https://github.com/dog-ai/github-wrapper/releases)

@@ -9,0 +8,0 @@ [![Version](https://img.shields.io/npm/v/@dog-ai/github-wrapper.svg)](https://www.npmjs.com/package/@dog-ai/github-wrapper)

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