@dog-ai/github-wrapper
Advanced tools
Comparing version 2.0.0 to 2.0.1
@@ -9,4 +9,2 @@ 'use strict'; | ||
const EventEmitter = require('events'); | ||
const _ = require('lodash'); | ||
@@ -20,6 +18,4 @@ | ||
class GitHubWrapper extends EventEmitter { | ||
class GitHubWrapper { | ||
constructor(options = {}) { | ||
super(); | ||
this._options = _.defaultsDeep({}, options, defaultOptions); | ||
@@ -136,4 +132,2 @@ | ||
_this6.emit('pulls:create', owner, repo, title, head, base); | ||
return data; | ||
@@ -152,4 +146,2 @@ } catch (error) { | ||
yield _this7._octokit.pulls.update({ owner, repo, pull_number: number, state: 'closed' }); | ||
_this7.emit('pulls:close', owner, repo, number); | ||
} catch (error) { | ||
@@ -179,4 +171,2 @@ throw new Error(_.get(error, 'errors[0].message', error.message)); | ||
_this8.emit('pulls:merge', owner, repo, number, sha, data, title, message, method); | ||
return data; | ||
@@ -201,4 +191,2 @@ } catch (error) { | ||
}); | ||
_this9.emit('pulls:review', owner, repo, number, commitId, event); | ||
} catch (error) { | ||
@@ -221,4 +209,2 @@ throw new Error(_.get(error, 'errors[0].message', error.message)); | ||
}); | ||
_this10.emit('pulls:review:request', owner, repo, number, reviewers); | ||
} catch (error) { | ||
@@ -225,0 +211,0 @@ throw new Error(_.get(error, 'errors[0].message', error.message)); |
{ | ||
"name": "@dog-ai/github-wrapper", | ||
"description": "A GitHub wrapper library", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"engines": { | ||
@@ -41,3 +41,3 @@ "node": ">= 6.0.0" | ||
"semantic-release": "15.13.12", | ||
"snyk": "1.167.2" | ||
"snyk": "1.169.0" | ||
}, | ||
@@ -44,0 +44,0 @@ "config": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
0
10807
170