auto-release-cli
Advanced tools
Comparing version 0.20.10 to 0.20.11
@@ -0,1 +1,91 @@ | ||
# v0.20.10 (Wed Dec 05 2018) | ||
--- | ||
# v0.20.10 (Wed Dec 05 2018) | ||
--- | ||
# v0.20.10 (Wed Dec 05 2018) | ||
--- | ||
# v0.20.10 (Wed Dec 05 2018) | ||
#### 🐛 Bug Fix | ||
- ignore invalid user [#3](https://github.com/intuit/auto-release/pull/3) (hipstersmoothie@users.noreply.github.com) | ||
- use correct url [#2](https://github.com/intuit/auto-release/pull/2) (hipstersmoothie@users.noreply.github.com) | ||
- add auto release to CI [#1](https://github.com/intuit/auto-release/pull/1) (hipstersmoothie@users.noreply.github.com) | ||
#### Authors: 1 | ||
- Andrew Lisowski (hipstersmoothie@users.noreply.github.com) | ||
--- | ||
# v0.20.10 (Wed Dec 05 2018) | ||
#### 🐛 Bug Fix | ||
- ignore invalid user [#3](https://github.com/intuit/auto-release/pull/3) (hipstersmoothie@users.noreply.github.com) | ||
- use correct url [#2](https://github.com/intuit/auto-release/pull/2) (hipstersmoothie@users.noreply.github.com) | ||
- add auto release to CI [#1](https://github.com/intuit/auto-release/pull/1) (hipstersmoothie@users.noreply.github.com) | ||
#### Authors: 1 | ||
- Andrew Lisowski (hipstersmoothie@users.noreply.github.com) | ||
--- | ||
# v0.20.10 (Wed Dec 05 2018) | ||
#### 🐛 Bug Fix | ||
- ignore invalid user [#3](https://github.com/intuit/auto-release/pull/3) (hipstersmoothie@users.noreply.github.com) | ||
- use correct url [#2](https://github.com/intuit/auto-release/pull/2) (hipstersmoothie@users.noreply.github.com) | ||
- add auto release to CI [#1](https://github.com/intuit/auto-release/pull/1) (hipstersmoothie@users.noreply.github.com) | ||
#### Authors: 1 | ||
- Andrew Lisowski (hipstersmoothie@users.noreply.github.com) | ||
--- | ||
# v0.20.10 (Wed Dec 05 2018) | ||
#### 🐛 Bug Fix | ||
- ignore invalid user [#3](https://github.com/intuit/auto-release/pull/3) (hipstersmoothie@users.noreply.github.com) | ||
- use correct url [#2](https://github.com/intuit/auto-release/pull/2) (hipstersmoothie@users.noreply.github.com) | ||
- add auto release to CI [#1](https://github.com/intuit/auto-release/pull/1) (hipstersmoothie@users.noreply.github.com) | ||
#### Authors: 1 | ||
- Andrew Lisowski (hipstersmoothie@users.noreply.github.com) | ||
--- | ||
# v0.20.10 (Wed Dec 05 2018) | ||
#### 🐛 Bug Fix | ||
- ignore invalid user [#3](https://github.com/intuit/auto-release/pull/3) (hipstersmoothie@users.noreply.github.com) | ||
- use correct url [#2](https://github.com/intuit/auto-release/pull/2) (hipstersmoothie@users.noreply.github.com) | ||
- add auto release to CI [#1](https://github.com/intuit/auto-release/pull/1) (hipstersmoothie@users.noreply.github.com) | ||
#### Authors: 1 | ||
- Andrew Lisowski (hipstersmoothie@users.noreply.github.com) | ||
--- | ||
# v0.20.10 (Wed Dec 05 2018) | ||
#### 🐛 Bug Fix | ||
- ignore invalid user [#3](https://github.com/intuit/auto-release/pull/3) (hipstersmoothie@users.noreply.github.com) | ||
- use correct url [#2](https://github.com/intuit/auto-release/pull/2) (hipstersmoothie@users.noreply.github.com) | ||
- add auto release to CI [#1](https://github.com/intuit/auto-release/pull/1) (hipstersmoothie@users.noreply.github.com) | ||
#### Authors: 1 | ||
- Andrew Lisowski (hipstersmoothie@users.noreply.github.com) | ||
--- | ||
# v0.20.8 (Mon Dec 03 2018) | ||
@@ -2,0 +92,0 @@ |
@@ -24,2 +24,3 @@ import GHub from '@octokit/rest'; | ||
private readonly logger; | ||
private hasAuthed; | ||
constructor(options: IGithubOptions); | ||
@@ -26,0 +27,0 @@ authenticate(authToken?: string): Promise<void>; |
@@ -103,2 +103,3 @@ "use strict"; | ||
this.options.baseUrl = this.options.baseUrl || 'https://api.github.com'; | ||
this.hasAuthed = false; | ||
this.logger.veryVerbose.info("Initializing Github with: " + this.options.baseUrl); | ||
@@ -113,2 +114,5 @@ this.ghub = new rest_1.default({ | ||
return __generator(this, function (_a) { | ||
if (this.hasAuthed) { | ||
return [2 /*return*/]; | ||
} | ||
if (authToken === undefined && this.options.token === undefined) { | ||
@@ -123,2 +127,3 @@ throw new Error('Auth needs a Github token.'); | ||
}); | ||
this.hasAuthed = true; | ||
this.logger.veryVerbose.info('Sucessfully authenticated with Github.'); | ||
@@ -125,0 +130,0 @@ return [2 /*return*/, Promise.resolve()]; |
@@ -216,3 +216,2 @@ "use strict"; | ||
var client, gitlog, commits; | ||
var _this = this; | ||
return __generator(this, function (_a) { | ||
@@ -232,40 +231,31 @@ switch (_a.label) { | ||
this.logger.veryVerbose.info('Added labels to commits:\n', commits); | ||
return [4 /*yield*/, Promise.all(commits.map(function (commit) { return __awaiter(_this, void 0, void 0, function () { | ||
var resolvedAuthors, prCommits, author; | ||
var _this = this; | ||
return __generator(this, function (_a) { | ||
switch (_a.label) { | ||
case 0: | ||
resolvedAuthors = []; | ||
if (!commit.pullRequest) return [3 /*break*/, 3]; | ||
return [4 /*yield*/, client.getCommitsForPR(Number(commit.pullRequest.number))]; | ||
case 1: | ||
prCommits = _a.sent(); | ||
if (!prCommits) { | ||
return [2 /*return*/]; | ||
} | ||
return [4 /*yield*/, Promise.all(prCommits.map(function (prCommit) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) { | ||
return [2 /*return*/, client.getUserByUsername(prCommit.author.login)]; | ||
}); }); }))]; | ||
case 2: | ||
resolvedAuthors = _a.sent(); | ||
return [3 /*break*/, 5]; | ||
case 3: | ||
if (!commit.author.email) return [3 /*break*/, 5]; | ||
return [4 /*yield*/, client.getUserByEmail(commit.author.email)]; | ||
case 4: | ||
author = _a.sent(); | ||
resolvedAuthors.push(author); | ||
_a.label = 5; | ||
case 5: | ||
commit.authors = resolvedAuthors.map(function (author) { return (__assign({}, author, { username: author ? author.login : undefined })); }); | ||
commit.authors.map(function (author) { | ||
_this.logger.veryVerbose.info("Found author: " + author.username); | ||
}); | ||
return [2 /*return*/]; | ||
} | ||
}); | ||
}); }))]; | ||
case 4: | ||
_a.sent(); | ||
// await Promise.all( | ||
// commits.map(async commit => { | ||
// let resolvedAuthors = []; | ||
// console.log('here'); | ||
// if (commit.pullRequest) { | ||
// const prCommits = await client.getCommitsForPR( | ||
// Number(commit.pullRequest.number) | ||
// ); | ||
// if (!prCommits) { | ||
// return; | ||
// } | ||
// resolvedAuthors = await Promise.all( | ||
// prCommits.map(async prCommit => | ||
// client.getUserByUsername(prCommit.author.login) | ||
// ) | ||
// ); | ||
// } else if (commit.author.email) { | ||
// const author = await client.getUserByEmail(commit.author.email); | ||
// resolvedAuthors.push(author); | ||
// } | ||
// commit.authors = resolvedAuthors.map(author => ({ | ||
// ...author, | ||
// username: author ? author.login : undefined | ||
// })); | ||
// commit.authors.map(author => { | ||
// this.logger.veryVerbose.info(`Found author: ${author.username}`); | ||
// }); | ||
// }) | ||
// ); | ||
return [2 /*return*/, commits]; | ||
@@ -272,0 +262,0 @@ } |
{ | ||
"name": "auto-release-cli", | ||
"description": "CLI tools to help facilitate semantic versioning based on Github PR labels.", | ||
"version": "0.20.10", | ||
"version": "0.20.11", | ||
"author": "Intuit", | ||
@@ -6,0 +6,0 @@ "license": "MIT", |
@@ -5,3 +5,3 @@ <div align="center"> | ||
<h1>auto-release</h1> | ||
<p>Generate releases based on semantic version labels on pull requests.</p> | ||
<p>Generate releases based on semantic version labels on pull requests. </p> | ||
</div | ||
@@ -8,0 +8,0 @@ |
Sorry, the diff of this file is not supported yet
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
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
182747
2422