@auto-it/core
Advanced tools
Comparing version 7.0.0-canary.406.5670.21 to 7.0.0-canary.406.5676.24
@@ -15,3 +15,3 @@ import Octokit from '@octokit/rest'; | ||
export default class Git { | ||
readonly ghub: Octokit; | ||
readonly github: Octokit; | ||
readonly options: IGitOptions; | ||
@@ -18,0 +18,0 @@ private readonly baseUrl; |
@@ -129,3 +129,3 @@ "use strict"; | ||
.plugin(plugin_throttling_1.default); | ||
this.ghub = new gitHub({ | ||
this.github = new gitHub({ | ||
baseUrl: this.baseUrl, | ||
@@ -148,3 +148,3 @@ auth: this.options.token, | ||
}); | ||
this.ghub.hook.error('request', function (error) { | ||
this.github.hook.error('request', function (error) { | ||
if (error && error.headers && error.headers.authorization) { | ||
@@ -161,3 +161,3 @@ delete error.headers.authorization; | ||
switch (_a.label) { | ||
case 0: return [4 /*yield*/, this.ghub.repos.getLatestRelease({ | ||
case 0: return [4 /*yield*/, this.github.repos.getLatestRelease({ | ||
owner: this.options.owner, | ||
@@ -262,3 +262,3 @@ repo: this.options.repo | ||
_a.trys.push([1, 3, , 4]); | ||
return [4 /*yield*/, this.ghub.issues.listLabelsOnIssue(args)]; | ||
return [4 /*yield*/, this.github.issues.listLabelsOnIssue(args)]; | ||
case 2: | ||
@@ -293,3 +293,3 @@ labels = _a.sent(); | ||
_a.trys.push([1, 3, , 4]); | ||
return [4 /*yield*/, this.ghub.issues.get(args)]; | ||
return [4 /*yield*/, this.github.issues.get(args)]; | ||
case 2: | ||
@@ -321,3 +321,3 @@ info = _a.sent(); | ||
_a.trys.push([1, 3, , 4]); | ||
return [4 /*yield*/, this.ghub.issues.listLabelsForRepo(args)]; | ||
return [4 /*yield*/, this.github.issues.listLabelsForRepo(args)]; | ||
case 2: | ||
@@ -368,3 +368,3 @@ labels = _a.sent(); | ||
_a.trys.push([0, 2, , 3]); | ||
return [4 /*yield*/, this.ghub.search.users({ | ||
return [4 /*yield*/, this.github.search.users({ | ||
q: "in:email " + email | ||
@@ -393,3 +393,3 @@ })]; | ||
_a.trys.push([0, 2, , 3]); | ||
return [4 /*yield*/, this.ghub.users.getByUsername({ | ||
return [4 /*yield*/, this.github.users.getByUsername({ | ||
username: username | ||
@@ -422,3 +422,3 @@ })]; | ||
this.logger.verbose.info('Getting pull request info using:', args); | ||
return [4 /*yield*/, this.ghub.pulls.get(args)]; | ||
return [4 /*yield*/, this.github.pulls.get(args)]; | ||
case 1: | ||
@@ -442,3 +442,3 @@ result = _a.sent(); | ||
this.logger.verbose.info('Searching repo using:\n', options); | ||
return [4 /*yield*/, this.ghub.search.issuesAndPullRequests(options)]; | ||
return [4 /*yield*/, this.github.search.issuesAndPullRequests(options)]; | ||
case 1: | ||
@@ -482,3 +482,3 @@ result = _a.sent(); | ||
this.logger.verbose.info('Creating status using:\n', args); | ||
return [4 /*yield*/, this.ghub.repos.createStatus(args)]; | ||
return [4 /*yield*/, this.github.repos.createStatus(args)]; | ||
case 1: | ||
@@ -503,3 +503,3 @@ result = _a.sent(); | ||
: tinycolor2_1.default.random().toString('hex6'); | ||
return [4 /*yield*/, this.ghub.issues.createLabel({ | ||
return [4 /*yield*/, this.github.issues.createLabel({ | ||
name: label.name, | ||
@@ -530,3 +530,3 @@ owner: this.options.owner, | ||
: tinycolor2_1.default.random().toString('hex6'); | ||
return [4 /*yield*/, this.ghub.issues.updateLabel({ | ||
return [4 /*yield*/, this.github.issues.updateLabel({ | ||
current_name: label.name, | ||
@@ -554,3 +554,3 @@ owner: this.options.owner, | ||
this.logger.verbose.info("Creating \"" + label + "\" label to PR " + pr); | ||
return [4 /*yield*/, this.ghub.issues.addLabels({ | ||
return [4 /*yield*/, this.github.issues.addLabels({ | ||
issue_number: pr, | ||
@@ -577,3 +577,3 @@ owner: this.options.owner, | ||
this.logger.verbose.info("Locking #" + issue + " issue..."); | ||
return [4 /*yield*/, this.ghub.issues.lock({ | ||
return [4 /*yield*/, this.github.issues.lock({ | ||
issue_number: issue, | ||
@@ -599,3 +599,3 @@ owner: this.options.owner, | ||
this.logger.verbose.info('Getting project from GitHub'); | ||
return [4 /*yield*/, this.ghub.repos.get({ | ||
return [4 /*yield*/, this.github.repos.get({ | ||
owner: this.options.owner, | ||
@@ -620,3 +620,3 @@ repo: this.options.repo | ||
this.logger.verbose.info('Getting pull requests...'); | ||
return [4 /*yield*/, this.ghub.pulls.list(__assign({ owner: this.options.owner.toLowerCase(), repo: this.options.repo.toLowerCase() }, options))]; | ||
return [4 /*yield*/, this.github.pulls.list(__assign({ owner: this.options.owner.toLowerCase(), repo: this.options.repo.toLowerCase() }, options))]; | ||
case 1: | ||
@@ -638,3 +638,3 @@ result = (_a.sent()).data; | ||
this.logger.verbose.info("Getting commits for PR #" + pr); | ||
return [4 /*yield*/, this.ghub.pulls.listCommits({ | ||
return [4 /*yield*/, this.github.pulls.listCommits({ | ||
owner: this.options.owner.toLowerCase(), | ||
@@ -662,3 +662,3 @@ repo: this.options.repo.toLowerCase(), | ||
this.logger.verbose.info('Getting previous comments on:', pr); | ||
return [4 /*yield*/, this.ghub.issues.listComments({ | ||
return [4 /*yield*/, this.github.issues.listComments({ | ||
owner: this.options.owner, | ||
@@ -680,3 +680,3 @@ repo: this.options.repo, | ||
this.logger.verbose.info("Deleting comment: " + commentId); | ||
return [4 /*yield*/, this.ghub.issues.deleteComment({ | ||
return [4 /*yield*/, this.github.issues.deleteComment({ | ||
owner: this.options.owner, | ||
@@ -707,3 +707,3 @@ repo: this.options.repo, | ||
this.logger.verbose.info('Creating new comment'); | ||
return [4 /*yield*/, this.ghub.issues.createComment({ | ||
return [4 /*yield*/, this.github.issues.createComment({ | ||
owner: this.options.owner, | ||
@@ -733,3 +733,3 @@ repo: this.options.repo, | ||
this.logger.verbose.info('Getting previous pr body on:', pr); | ||
return [4 /*yield*/, this.ghub.issues.get({ | ||
return [4 /*yield*/, this.github.issues.get({ | ||
owner: this.options.owner, | ||
@@ -753,3 +753,3 @@ repo: this.options.repo, | ||
this.logger.verbose.info('Creating new pr body'); | ||
return [4 /*yield*/, this.ghub.issues.update({ | ||
return [4 /*yield*/, this.github.issues.update({ | ||
owner: this.options.owner, | ||
@@ -776,3 +776,3 @@ repo: this.options.repo, | ||
this.logger.verbose.info('Creating release on GitHub for tag:', tag); | ||
return [4 /*yield*/, this.ghub.repos.createRelease({ | ||
return [4 /*yield*/, this.github.repos.createRelease({ | ||
owner: this.options.owner, | ||
@@ -779,0 +779,0 @@ repo: this.options.repo, |
{ | ||
"name": "@auto-it/core", | ||
"version": "7.0.0-canary.406.5670.21+bc7511a", | ||
"version": "7.0.0-canary.406.5676.24+3933ef3", | ||
"description": "Node API for using auto.", | ||
@@ -82,3 +82,3 @@ "main": "dist/auto.js", | ||
}, | ||
"gitHead": "bc7511a437de6df577e097e5648df9034e3702d1" | ||
"gitHead": "3933ef3139ce0bede51b1c7d3ec46d85f5250074" | ||
} |
Sorry, the diff of this file is not supported yet
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
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
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
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
655969