Repository: intuit/auto
Pull request #819 (2019-12-19 01:08:53)

only access auto login if it all exists
Sometimes it could be undefined
<!-- GITHUB_RELEASE PR BODY: canary-version -->
Published PR with canary version: <details><summary>Published under canary scope @auto-canary</summary>
- `@auto-canary/auto@8.6.2-canary.819.10874.0`
- `@auto-canary/core@8.6.2-canary.819.10874.0`
- `@auto-canary/all-contributors@8.6.2-canary.819.10874.0`
- `@auto-canary/chrome@8.6.2-canary.819.10874.0`
- `@auto-canary/conventional-commits@8.6.2-canary.819.10874.0`
- `@auto-canary/crates@8.6.2-canary.819.10874.0`
- `@auto-canary/first-time-contributor@8.6.2-canary.819.10874.0`
- `@auto-canary/git-tag@8.6.2-canary.819.10874.0`
- `@auto-canary/jira@8.6.2-canary.819.10874.0`
- `@auto-canary/maven@8.6.2-canary.819.10874.0`
- `@auto-canary/npm@8.6.2-canary.819.10874.0`
- `@auto-canary/omit-commits@8.6.2-canary.819.10874.0`
- `@auto-canary/omit-release-notes@8.6.2-canary.819.10874.0`
- `@auto-canary/released@8.6.2-canary.819.10874.0`
- `@auto-canary/s3@8.6.2-canary.819.10874.0`
- `@auto-canary/slack@8.6.2-canary.819.10874.0`
- `@auto-canary/twitter@8.6.2-canary.819.10874.0`
- `@auto-canary/upload-assets@8.6.2-canary.819.10874.0`</details>
<!-- GITHUB_RELEASE PR BODY: canary-version -->



Patch:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index ad891ebe..341d2403 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,20 +1,3 @@
-# v8.6.1 (Wed Dec 18 2019)
-
-#### 🐛  Bug Fix
-
-- `@auto-it/core`
-  - canary hook can return void to not bail [#817](https://github.com/intuit/auto/pull/817) ([@hipstersmoothie](https://github.com/hipstersmoothie))
-
-#### 📝  Documentation
-
-- update docs to show JS plugins and how to use versionBranches [#816](https://github.com/intuit/auto/pull/816) ([@hipstersmoothie](https://github.com/hipstersmoothie))
-
-#### Authors: 1
-
-- Andrew Lisowski ([@hipstersmoothie](https://github.com/hipstersmoothie))
-
----
-
 # v8.5.0 (Tue Dec 17 2019)
 
 #### 🚀  Enhancement
diff --git a/Formula/auto.rb b/Formula/auto.rb
index 614be8fe..c11e9a50 100644
--- a/Formula/auto.rb
+++ b/Formula/auto.rb
@@ -1,8 +1,8 @@
 class Auto < Formula
   desc "Generate releases based on semantic version labels on pull requests."
   homepage "https://intuit.github.io/auto/home.html"
-  url "https://github.com/intuit/auto/releases/download/v8.6.1/auto-macos.gz"
-  sha256 "d85f03ae3fda778026e94cf4a59fcad3d12879e01493e9f734afb6c9f1ba6f92"
+  url "https://github.com/intuit/auto/releases/download/v8.6.0/auto-macos.gz"
+  sha256 "2b9f66d35c0415bda760e772ac8398ec704aabb82ba3c4909e9ae4c641269d97"
 
   def install
     libexec.install Dir["*"]
diff --git a/lerna.json b/lerna.json
index b162a23c..d7fb4f5c 100644
--- a/lerna.json
+++ b/lerna.json
@@ -1,5 +1,5 @@
 {
-  "version": "8.6.1",
+  "version": "8.6.0",
   "npmClient": "yarn",
   "useWorkspaces": true,
   "packages": [
diff --git a/packages/cli/package.json b/packages/cli/package.json
index e69993f8..34e86dbd 100644
--- a/packages/cli/package.json
+++ b/packages/cli/package.json
@@ -2,7 +2,7 @@
   "name": "auto",
   "bin": "dist/bin/auto.js",
   "description": "CLI tools to help facilitate semantic versioning based on GitHub PR labels",
-  "version": "8.6.1",
+  "version": "8.6.0",
   "author": {
     "name": "Andrew Lisowski",
     "email": "lisowski54@gmail.com"
diff --git a/packages/core/CHANGELOG.md b/packages/core/CHANGELOG.md
index 6be18f74..5fcb5bca 100644
--- a/packages/core/CHANGELOG.md
+++ b/packages/core/CHANGELOG.md
@@ -1,17 +1,3 @@
-# v8.6.1 (Wed Dec 18 2019)
-
-#### 🐛  Bug Fix
-
-- fix tests  ([@hipstersmoothie](https://github.com/hipstersmoothie))
-- fix build  ([@hipstersmoothie](https://github.com/hipstersmoothie))
-- canary hook can return void to not bail  ([@hipstersmoothie](https://github.com/hipstersmoothie))
-
-#### Authors: 1
-
-- Andrew Lisowski ([@hipstersmoothie](https://github.com/hipstersmoothie))
-
----
-
 # v8.6.0 (Tue Dec 17 2019)
 
 #### 🐛  Bug Fix
diff --git a/packages/core/package.json b/packages/core/package.json
index 14070cf1..eccb77f8 100644
--- a/packages/core/package.json
+++ b/packages/core/package.json
@@ -1,6 +1,6 @@
 {
   "name": "@auto-it/core",
-  "version": "8.6.1",
+  "version": "8.6.0",
   "description": "Node API for using auto.",
   "main": "dist/auto.js",
   "author": {
diff --git a/packages/core/src/release.ts b/packages/core/src/release.ts
index 95b63238..a9fa4cef 100644
--- a/packages/core/src/release.ts
+++ b/packages/core/src/release.ts
@@ -776,7 +776,7 @@ export default class Release {
     } else {
       const [, response] = await on(this.git.getCommit(commit.hash));
 
-      if (response) {
+      if (response?.data?.author?.login) {
         const username = response.data.author.login;
         const author = await this.git.getUserByUsername(username);
 
diff --git a/plugins/all-contributors/package.json b/plugins/all-contributors/package.json
index 107593ab..4a0e0c9b 100644
--- a/plugins/all-contributors/package.json
+++ b/plugins/all-contributors/package.json
@@ -1,6 +1,6 @@
 {
   "name": "@auto-it/all-contributors",
-  "version": "8.6.1",
+  "version": "8.6.0",
   "main": "dist/index.js",
   "description": "Automatically add contributors as changelogs are produced.",
   "author": {
diff --git a/plugins/chrome/package.json b/plugins/chrome/package.json
index d91a2740..30feac2a 100644
--- a/plugins/chrome/package.json
+++ b/plugins/chrome/package.json
@@ -1,6 +1,6 @@
 {
   "name": "@auto-it/chrome",
-  "version": "8.6.1",
+  "version": "8.6.0",
   "main": "dist/index.js",
   "description": "Chrome publishing plugin for auto",
   "author": {
diff --git a/plugins/conventional-commits/package.json b/plugins/conventional-commits/package.json
index e67f699c..e9e67f98 100644
--- a/plugins/conventional-commits/package.json
+++ b/plugins/conventional-commits/package.json
@@ -1,6 +1,6 @@
 {
   "name": "@auto-it/conventional-commits",
-  "version": "8.6.1",
+  "version": "8.6.0",
   "main": "dist/index.js",
   "description": "Conventional commit plugin for auto",
   "author": {
diff --git a/plugins/crates/package.json b/plugins/crates/package.json
index 8b83f139..b116ca4e 100644
--- a/plugins/crates/package.json
+++ b/plugins/crates/package.json
@@ -1,6 +1,6 @@
 {
   "name": "@auto-it/crates",
-  "version": "8.6.1",
+  "version": "8.6.0",
   "main": "dist/index.js",
   "description": "Deploy Rust crates to crates.io",
   "author": {
diff --git a/plugins/first-time-contributor/package.json b/plugins/first-time-contributor/package.json
index 63fc31b8..c0a293d9 100644
--- a/plugins/first-time-contributor/package.json
+++ b/plugins/first-time-contributor/package.json
@@ -1,6 +1,6 @@
 {
   "name": "@auto-it/first-time-contributor",
-  "version": "8.6.1",
+  "version": "8.6.0",
   "main": "dist/index.js",
   "description": "Thank first time contributors for their work right in your release notes.",
   "author": {
diff --git a/plugins/git-tag/package.json b/plugins/git-tag/package.json
index 8c632fc1..51fcc6b5 100644
--- a/plugins/git-tag/package.json
+++ b/plugins/git-tag/package.json
@@ -1,6 +1,6 @@
 {
   "name": "@auto-it/git-tag",
-  "version": "8.6.1",
+  "version": "8.6.0",
   "main": "dist/index.js",
   "description": "Manage your projects version through just a git tag",
   "author": {
diff --git a/plugins/jira/package.json b/plugins/jira/package.json
index 3cddeed5..76938e69 100644
--- a/plugins/jira/package.json
+++ b/plugins/jira/package.json
@@ -1,6 +1,6 @@
 {
   "name": "@auto-it/jira",
-  "version": "8.6.1",
+  "version": "8.6.0",
   "main": "dist/index.js",
   "description": "Jira plugin for auto",
   "author": {
diff --git a/plugins/maven/package.json b/plugins/maven/package.json
index 38463b1b..ab3c21f1 100644
--- a/plugins/maven/package.json
+++ b/plugins/maven/package.json
@@ -1,6 +1,6 @@
 {
   "name": "@auto-it/maven",
-  "version": "8.6.1",
+  "version": "8.6.0",
   "main": "dist/index.js",
   "description": "Maven publishing plugin for auto",
   "author": {
diff --git a/plugins/npm/package.json b/plugins/npm/package.json
index e27d07d2..b8dd55c4 100644
--- a/plugins/npm/package.json
+++ b/plugins/npm/package.json
@@ -1,6 +1,6 @@
 {
   "name": "@auto-it/npm",
-  "version": "8.6.1",
+  "version": "8.6.0",
   "main": "dist/index.js",
   "description": "NPM publishing plugin for auto",
   "author": {
diff --git a/plugins/omit-commits/package.json b/plugins/omit-commits/package.json
index 02d4e972..772c6aa3 100644
--- a/plugins/omit-commits/package.json
+++ b/plugins/omit-commits/package.json
@@ -1,6 +1,6 @@
 {
   "name": "@auto-it/omit-commits",
-  "version": "8.6.1",
+  "version": "8.6.0",
   "main": "dist/index.js",
   "description": "Omit commits plugin for auto",
   "author": {
diff --git a/plugins/omit-release-notes/package.json b/plugins/omit-release-notes/package.json
index 0d5d3122..d4982ee5 100644
--- a/plugins/omit-release-notes/package.json
+++ b/plugins/omit-release-notes/package.json
@@ -1,6 +1,6 @@
 {
   "name": "@auto-it/omit-release-notes",
-  "version": "8.6.1",
+  "version": "8.6.0",
   "main": "dist/index.js",
   "description": "Omit release notes plugin for auto",
   "author": {
diff --git a/plugins/released/package.json b/plugins/released/package.json
index 6be9d7b9..3be23700 100644
--- a/plugins/released/package.json
+++ b/plugins/released/package.json
@@ -1,6 +1,6 @@
 {
   "name": "@auto-it/released",
-  "version": "8.6.1",
+  "version": "8.6.0",
   "main": "dist/index.js",
   "description": "Released plugin for auto. Comments with version + extra",
   "author": {
diff --git a/plugins/s3/package.json b/plugins/s3/package.json
index 83e93e63..48b6f7bb 100644
--- a/plugins/s3/package.json
+++ b/plugins/s3/package.json
@@ -1,6 +1,6 @@
 {
   "name": "@auto-it/s3",
-  "version": "8.6.1",
+  "version": "8.6.0",
   "main": "dist/index.js",
   "description": "Post your built artifacts to s3",
   "author": {
diff --git a/plugins/slack/package.json b/plugins/slack/package.json
index aa198dc2..b23180a3 100644
--- a/plugins/slack/package.json
+++ b/plugins/slack/package.json
@@ -1,6 +1,6 @@
 {
   "name": "@auto-it/slack",
-  "version": "8.6.1",
+  "version": "8.6.0",
   "main": "dist/index.js",
   "description": "Slack plugin for auto",
   "author": {
diff --git a/plugins/twitter/package.json b/plugins/twitter/package.json
index f812080b..03258f15 100644
--- a/plugins/twitter/package.json
+++ b/plugins/twitter/package.json
@@ -1,6 +1,6 @@
 {
   "name": "@auto-it/twitter",
-  "version": "8.6.1",
+  "version": "8.6.0",
   "main": "dist/index.js",
   "description": "Twitter plugin for auto",
   "author": {
diff --git a/plugins/upload-assets/package.json b/plugins/upload-assets/package.json
index b0b8987d..6793729a 100644
--- a/plugins/upload-assets/package.json
+++ b/plugins/upload-assets/package.json
@@ -1,6 +1,6 @@
 {
   "name": "@auto-it/upload-assets",
-  "version": "8.6.1",
+  "version": "8.6.0",
   "main": "dist/index.js",
   "description": "Upload assets plugin for auto",
   "author": {


Test patch:
diff --git a/packages/core/src/__tests__/__snapshots__/release.test.ts.snap b/packages/core/src/__tests__/__snapshots__/release.test.ts.snap
index 7a69a0b0..15b09531 100644
--- a/packages/core/src/__tests__/__snapshots__/release.test.ts.snap
+++ b/packages/core/src/__tests__/__snapshots__/release.test.ts.snap
@@ -231,9 +231,7 @@ Array [
       Object {
         "email": "adam@dierkens.com",
         "hash": "1a2b",
-        "login": "adam",
         "name": "Adam Dierkens",
-        "username": "adam",
       },
     ],
     "files": Array [],
@@ -276,9 +274,7 @@ Array [
       Object {
         "email": "adam@dierkens.com",
         "hash": "1a2b",
-        "login": "adam",
         "name": "Adam Dierkens",
-        "username": "adam",
       },
     ],
     "files": Array [],
@@ -433,9 +429,7 @@ Array [
       Object {
         "email": "adam@dierkens.com",
         "hash": "foo",
-        "login": "adam",
         "name": "Adam Dierkens",
-        "username": "adam",
       },
     ],
     "files": Array [],
diff --git a/packages/core/src/__tests__/release.test.ts b/packages/core/src/__tests__/release.test.ts
index 4d4c2030..b76172a5 100644
--- a/packages/core/src/__tests__/release.test.ts
+++ b/packages/core/src/__tests__/release.test.ts
@@ -23,6 +23,7 @@ afterAll(() => {
 const constructor = jest.fn();
 const getGitLog = jest.fn();
 const graphql = jest.fn();
+const getUserByEmail = jest.fn();
 const getPr = jest.fn();
 const getPullRequest = jest.fn();
 const getLatestRelease = jest.fn();
@@ -84,6 +85,7 @@ jest.mock(
       getCommitDate = getCommitDate;
       getFirstCommit = getFirstCommit;
       getCommit = getCommit;
+      getUserByEmail = getUserByEmail;
     }
 );
 
@@ -246,6 +248,10 @@ describe('Release', () => {
         ])
       );
 
+      getCommit.mockReturnValueOnce(
+        Promise.resolve({ data: { author: { login: 'adam' } } })
+      );
+
       getCommit.mockReturnValueOnce(
         Promise.resolve({ data: { author: { login: 'adam' } } })
       );