Repository: intuit/auto
Pull request #786 (2019-12-12 03:35:48)

only grant contributions for work in commit
The all contributions plugin was giving contributions for every file changed, no matter the author. Now contributions are only granted for code and author actually wrote.
<!-- GITHUB_RELEASE PR BODY: canary-version -->
Published PR with canary version: `8.0.0-canary.786.10356.0`
<!-- GITHUB_RELEASE PR BODY: canary-version -->



Patch:
diff --git a/docs/blog/v8.md b/docs/blog/v8.md
deleted file mode 100644
index 65cabf07..00000000
--- a/docs/blog/v8.md
+++ /dev/null
@@ -1,157 +0,0 @@
----
-image: https://images.unsplash.com/photo-1485795046599-702122cd1267?crop=entropy&cs=tinysrgb&fit=crop&fm=jpg&h=500&ixid=eyJhcHBfaWQiOjF9&ixlib=rb-1.2.1&q=80&w=1950
-title: Announcing "auto" 8.0.0
-author:
-  name: Andrew Lisowski
-  url: https://twitter.com/HipsterSmoothie
-  email: lisowski54@gmail.com
----
-
-We are excited to announce the release of `auto` 8.0.0.
-This release brings a new command `next`, a new use for `shipit`, more powerful label configuration, and more.
-
-If you are unfamiliar, `auto` is a CLI tool which helps you version your code and automate any part of your release pipeline.
-`auto`'s main use is for automating your versioning with [semantic versioning](https://semver.org/) and [GitHub](https://github.com/) pull request labels.
-It handles determining the next version, creating changelogs, publishing to package managers, publishing [GitHub Releases](https://help.github.com/en/github/administering-a-repository/about-releases), and so much more through plugins.
-
-If you aren't already using `auto` you can either install it through npm:
-
-```sh
-npm install auto
-```
-
-Or if you are publishing to something other than npm:
-
-```sh
-# On OSX
-brew tap intuit/auto https://github.com/intuit/auto
-brew install auto
-
-# Or other OSs
-# Download a platform specific version of auto
-curl -vkL -o - https://github.com/intuit/auto/releases/download/v8.0.0/auto-linux.gz | gunzip > ~/auto
-# Make auto executable
-chmod a+x ~/auto
-```
-
-## `next` Command
-
-This new command will make a preview release of your code. This entails:
-
-1. Creating a prerelease on package management platform (supported by `npm` and `git-tag` plugins)
-2. Creating a tag and "Pre Release" on GitHub releases page
-
-The only prerelease branch `auto` comes configured with is `next`.
-You can configure as many branches as you want with the [prereleaseBranches](../pages/autorc.md#prerelease-branches) `.autorc` option.
-If your package manager plugin supports release tags, such as the [npm](../../plugins/npm/README.md) plugin, `auto` will publish the prerelease branch to a tag of the same name.
-Calling `auto next` from a one of these branches will publish a prerelease, otherwise it will publish to your default prerelease branch/tag.
-
-### Example Usage
-
-Given the following configuration:
-
-```json
-{
-  "prereleaseBranches": ["beta"]
-}
-```
-
-Run `auto next` from `beta` branch => Publish prerelease to `beta` tag.
-Run `auto next` from `feature` branch => Publish prerelease to `beta` tag.
-
-## Prerelease Branches with `shipit`
-
-The `shipit` command will now also publish a prerelease when ran from a prerelease branch. You can use this in a few different ways:
-
-1. Two release branches: `master` and `next`
-2. Without `next` Branch (`--only-graduate-with-release-label`)
-3. Multiple `next` Branches (ex: `alpha`, `beta`, `rc`)
-4. Feature Pre-releases
-
-Read more [here](../pages/generated/shipit.md#prereleases).
-
-## Label Configuration
-
-Label configuration just got a whole lot simpler 🎉.
-
-1. Labels can now only be supplied as an array of label objects.
-
-   ```json
-   {
-     "labels": [
-       { "releaseType": "major", "name": "Version: Major" },
-       { "releaseType": "minor", "name": "Version: Minor" },
-       { "releaseType": "patch", "name": "Version: Patch" }
-     ]
-   }
-   ```
-
-2. Instead of using `skipReleaseLabels` just set the label's `type` to `skip`
-
-   ```json
-   {
-     "labels": [{ "releaseType": "skip", "name": "NO!" }]
-   }
-   ```
-
-3. Overwrite default labels using `overwrite`
-
-   ```json
-   {
-     "labels": [
-       { "releaseType": "major", "name": "Version: Major", "overwrite": true }
-     ]
-   }
-   ```
-
-4. Add `none` `releaseType`. This will act as a `skip-release` unless paired with a SEMVER label
-
-   ```json
-   {
-     "labels": [{ "releaseType": "none", "name": "documentation" }]
-   }
-   ```
-
-5. Changed `title` to `changelogTitle`.
-
-   ```json
-   {
-     "labels": [{ "changelogTitle": "New Docs Yo!", "name": "documentation" }]
-   }
-   ```
-
-## Upload Assets - Globs
-
-You might want to upload multiple files or you might not know the file-name (ex: a vscode extension w/ a version number in the name), but you know the pattern of the filenames that you want to upload.
-So now you can use [globs](https://github.com/mrmlnc/fast-glob#basic-syntax)!
-
-```json
-{
-  "plugins": [["upload-assets", ["./path/**/to/*.file"]]]
-}
-```
-
-## 💥 Other Notable Breaking Changes
-
-### Deprecate `--very-verbose, -w` Flag
-
-Using -w for very verbose logs was a very odd choice on my part (two `v`s next to each other look like a `w` 😓).
-Instead you can now just add another `-v` and get the very verbose logs!
-
-```sh
-# old
-auto shipit -w
-
-# new
-auto shipit -vv
-# or
-auto shipit --verbose --verbose
-```
-
----
-
-We hope you enjoy the new ways you can release your code!
-
-– Andrew Lisowski and the `auto` Team
-
-[View the full release notes](https://github.com/intuit/auto/releases/tag/v8.0.0).
diff --git a/docs/pages/extras/shipit.md b/docs/pages/extras/shipit.md
index 023738bd..c69ef53c 100644
--- a/docs/pages/extras/shipit.md
+++ b/docs/pages/extras/shipit.md
@@ -4,7 +4,7 @@ If you are interested in pre-releases (ex: `alpha`, `beta`, `next`) `auto` has t
 
 ### Setup
 
-You should make your pre-release branches protected on GitHub. This will prevent a bunch of unwanted behavior from happening.
+You should make you pre-release branches protected on GitHub. This will prevent a bunch of unwanted behavior from happening.
 
 1. Go to you project's setting on [GitHub](https://github.com)
 2. Click `Branches`
diff --git a/package.json b/package.json
index d2904ed7..076948c9 100644
--- a/package.json
+++ b/package.json
@@ -54,7 +54,7 @@
     "eslint-plugin-prettier": "^3.1.1",
     "graphql": "^14.2.1",
     "husky": "^3.0.3",
-    "ignite": "^1.10.9",
+    "ignite": "^1.10.8",
     "jest": "~24.9.0",
     "jest-serializer-path": "^0.1.15",
     "lerna": "^3.13.4",
diff --git a/packages/cli/src/parse-args.ts b/packages/cli/src/parse-args.ts
index 80c29322..02601c50 100644
--- a/packages/cli/src/parse-args.ts
+++ b/packages/cli/src/parse-args.ts
@@ -480,8 +480,6 @@ export const commands: Command[] = [
 
       1. Creates a prerelease on package management platform
       2. Creates a "Pre Release" on GitHub releases page.
-
-      Calling the \`next\` command from a prerelease branch will publish a prerelease, otherwise it will publish to the default prerelease branch.
     `,
     examples: ['{green $} auto next'],
     options: [
diff --git a/packages/core/src/auto.ts b/packages/core/src/auto.ts
index 057e65d4..d1c9f1d6 100644
--- a/packages/core/src/auto.ts
+++ b/packages/core/src/auto.ts
@@ -1044,10 +1044,7 @@ export default class Auto {
 
     const options = {
       bump,
-      commits: await this.release.getCommitsInRelease(
-        lastRelease,
-        to || undefined
-      ),
+      commits: await this.release.getCommits(lastRelease, to || undefined),
       releaseNotes,
       lastRelease,
       currentVersion
diff --git a/packages/core/src/git.ts b/packages/core/src/git.ts
index f21f5334..8a52162d 100644
--- a/packages/core/src/git.ts
+++ b/packages/core/src/git.ts
@@ -243,6 +243,27 @@ export default class Git {
     }
   }
 
+  /** Get information about specific commit */
+  @memoize()
+  async getCommit(sha: string) {
+    this.logger.verbose.info(`Getting info for commit: ${sha}`);
+
+    try {
+      const info = await this.github.repos.getCommit({
+        owner: this.options.owner,
+        repo: this.options.repo,
+        ref: sha
+      });
+      this.logger.veryVerbose.info(
+        'Got response for "repos.getCommit":\n',
+        info
+      );
+      return info;
+    } catch (e) {
+      throw new GitAPIError('getCommit', [], e);
+    }
+  }
+
   /** Get the labels for a the project */
   async getProjectLabels() {
     this.logger.verbose.info(
diff --git a/packages/core/src/log-parse.ts b/packages/core/src/log-parse.ts
index 1933afe1..673c4737 100644
--- a/packages/core/src/log-parse.ts
+++ b/packages/core/src/log-parse.ts
@@ -9,6 +9,8 @@ export interface ICommitAuthor {
   email?: string;
   /** Author's username */
   username?: string;
+  /** The commit this author created */
+  hash?: string;
 }
 
 export interface IPullRequest {
diff --git a/packages/core/src/release.ts b/packages/core/src/release.ts
index 6c9c781c..c935416a 100644
--- a/packages/core/src/release.ts
+++ b/packages/core/src/release.ts
@@ -760,22 +760,34 @@ export default class Release {
 
           return {
             ...prCommit.author,
-            ...(await this.git.getUserByUsername(prCommit.author.login))
+            ...(await this.git.getUserByUsername(prCommit.author.login)),
+            hash: prCommit.sha
           };
         })
       );
-    } else if (commit.authorEmail) {
-      const author = commit.authorEmail.includes('@users.noreply.github.com')
-        ? await this.git.getUserByUsername(
-            commit.authorEmail.split('@users')[0]
-          )
-        : await this.git.getUserByEmail(commit.authorEmail);
-
-      resolvedAuthors.push({
-        email: commit.authorEmail,
-        name: commit.authorName,
-        ...author
-      });
+    } else {
+      const [, response] = await on(this.git.getCommit(commit.hash));
+
+      if (response) {
+        const username = response.data.author.login;
+        const author = await this.git.getUserByUsername(username);
+
+        resolvedAuthors.push({
+          name: commit.authorName,
+          email: commit.authorEmail,
+          ...author,
+          hash: commit.hash
+        });
+      } else if (commit.authorEmail) {
+        const author = await this.git.getUserByEmail(commit.authorEmail);
+
+        resolvedAuthors.push({
+          email: commit.authorEmail,
+          name: commit.authorName,
+          ...author,
+          hash: commit.hash
+        });
+      }
     }
 
     modifiedCommit.authors = resolvedAuthors.map(author => ({
diff --git a/plugins/all-contributors/src/index.ts b/plugins/all-contributors/src/index.ts
index 9943936e..3a0bd70b 100644
--- a/plugins/all-contributors/src/index.ts
+++ b/plugins/all-contributors/src/index.ts
@@ -136,11 +136,15 @@ export default class AllContributorsPlugin implements IPlugin {
               return isMatch;
             })
             .forEach(contribution => {
-              authors.forEach(({ username }) => {
+              authors.forEach(({ username, hash }) => {
                 if (!username) {
                   return;
                 }
 
+                if (commit.hash !== hash) {
+                  return;
+                }
+
                 if (!authorContributions[username]) {
                   authorContributions[username] = new Set();
                 }
diff --git a/plugins/npm/src/index.ts b/plugins/npm/src/index.ts
index 72dd875b..53f9a1f0 100644
--- a/plugins/npm/src/index.ts
+++ b/plugins/npm/src/index.ts
@@ -443,13 +443,13 @@ export default class NPMPlugin implements IPlugin {
           }
         });
 
-        this.renderMonorepoChangelog = true;
-
         // Cannot run git operations in parallel
         await promises.reduce(
           async (last, next) => last.then(() => next),
           Promise.resolve()
         );
+
+        this.renderMonorepoChangelog = true;
       }
     );
 
diff --git a/yarn.lock b/yarn.lock
index 2a9a4fb5..6ec14355 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -46,7 +46,6 @@
     registry-url "^5.1.0"
     semver "^6.0.0"
     tslib "1.10.0"
-    typescript-memoize "^1.0.0-alpha.3"
     url-join "^4.0.0"
     user-home "^2.0.0"
 
@@ -7830,10 +7829,10 @@ iferr@^0.1.5:
   resolved "https://registry.yarnpkg.com/iferr/-/iferr-0.1.5.tgz#c60eed69e6d8fdb6b3104a1fcbca1c192dc5b501"
   integrity sha1-xg7taebY/bazEEofy8ocGS3FtQE=
 
-ignite@^1.10.9:
-  version "1.10.9"
-  resolved "https://registry.yarnpkg.com/ignite/-/ignite-1.10.9.tgz#983ccfc66171c3c886c750b6d79e8b6186aa562f"
-  integrity sha512-sVdM9snXMIwf8HnHRRRGlzt+musE5bUjHe0ebtRPcPkU7fibnmvSTg08Iv3khyUUtbKxHV4VALRNGwWJWjit1g==
+ignite@^1.10.8:
+  version "1.10.8"
+  resolved "https://registry.yarnpkg.com/ignite/-/ignite-1.10.8.tgz#c045ae1f4b5b305389f1e35b72eca08182ab20ab"
+  integrity sha512-Pvem4/HyU8PGK/xPUWCOuTVPXMGpOSP1VLE98zmqmQjpuo9ut7Xx/qO4GJMcnZ7uWr9lVcTtqh4bz4foDszfNw==
   dependencies:
     "@babel/cli" "7.2.0"
     "@babel/core" "7.2.0"


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 7ba8c58b..7a69a0b0 100644
--- a/packages/core/src/__tests__/__snapshots__/release.test.ts.snap
+++ b/packages/core/src/__tests__/__snapshots__/release.test.ts.snap
@@ -166,6 +166,7 @@ Array [
     "authorName": "Andrew Lisowski",
     "authors": Array [
       Object {
+        "hash": undefined,
         "login": "andrew",
         "name": "Andrew Lisowski",
         "username": "andrew",
@@ -229,7 +230,10 @@ Array [
     "authors": Array [
       Object {
         "email": "adam@dierkens.com",
+        "hash": "1a2b",
+        "login": "adam",
         "name": "Adam Dierkens",
+        "username": "adam",
       },
     ],
     "files": Array [],
@@ -271,7 +275,10 @@ Array [
     "authors": Array [
       Object {
         "email": "adam@dierkens.com",
+        "hash": "1a2b",
+        "login": "adam",
         "name": "Adam Dierkens",
+        "username": "adam",
       },
     ],
     "files": Array [],
@@ -288,6 +295,59 @@ Array [
 ]
 `;
 
+exports[`Release getCommits should not resolve authors with no PR commits 1`] = `
+Array [
+  Object {
+    "authorEmail": "adam@dierkens.com",
+    "authorName": "Adam Dierkens",
+    "authors": Array [
+      Object {
+        "email": "adam@dierkens.com",
+        "hash": "foo",
+        "name": "Adam Dierkens",
+      },
+    ],
+    "files": Array [],
+    "hash": "foo",
+    "labels": Array [],
+    "pullRequest": undefined,
+    "subject": "First",
+  },
+  Object {
+    "authorEmail": "adam@dierkens.com",
+    "authorName": "Adam Dierkens",
+    "authors": Array [
+      Object {
+        "email": "adam@dierkens.com",
+        "hash": "foo",
+        "name": "Adam Dierkens",
+      },
+    ],
+    "files": Array [],
+    "hash": "foo",
+    "labels": Array [],
+    "pullRequest": undefined,
+    "subject": "Second",
+  },
+  Object {
+    "authorEmail": "adam@dierkens.com",
+    "authorName": "Adam Dierkens",
+    "authors": Array [
+      Object {
+        "email": "adam@dierkens.com",
+        "hash": "foo",
+        "name": "Adam Dierkens",
+      },
+    ],
+    "files": Array [],
+    "hash": "foo",
+    "labels": Array [],
+    "pullRequest": undefined,
+    "subject": "Third",
+  },
+]
+`;
+
 exports[`Release getCommits should omit commits that have already been released 1`] = `
 Array [
   Object {
@@ -318,6 +378,7 @@ Array [
     "authors": Array [
       Object {
         "email": "adam@dierkens.com",
+        "hash": "foo",
         "login": "adam",
         "name": "Adam Dierkens",
         "username": "adam",
@@ -334,6 +395,7 @@ Array [
     "authorName": "Andrew Lisowski",
     "authors": Array [
       Object {
+        "hash": undefined,
         "login": "andrew",
         "name": "Andrew Lisowski",
         "username": "andrew",
@@ -370,6 +432,7 @@ Array [
     "authors": Array [
       Object {
         "email": "adam@dierkens.com",
+        "hash": "foo",
         "login": "adam",
         "name": "Adam Dierkens",
         "username": "adam",
diff --git a/packages/core/src/__tests__/release.test.ts b/packages/core/src/__tests__/release.test.ts
index 2eb94cc0..265154f2 100644
--- a/packages/core/src/__tests__/release.test.ts
+++ b/packages/core/src/__tests__/release.test.ts
@@ -27,12 +27,14 @@ const getPr = jest.fn();
 const getPullRequest = jest.fn();
 const getLatestRelease = jest.fn();
 const getSha = jest.fn();
+const getCommit = jest
+  .fn()
+  .mockReturnValue(Promise.resolve({ data: { author: { login: '' } } }));
 const createStatus = jest.fn();
 const getProject = jest.fn();
 const createComment = jest.fn();
 const changedPackages = jest.fn();
 const getCommitsForPR = jest.fn().mockReturnValue(Promise.resolve(undefined));
-const getUserByEmail = jest.fn();
 const getUserByUsername = jest.fn();
 const getProjectLabels = jest.fn();
 const createLabel = jest.fn();
@@ -73,7 +75,6 @@ jest.mock(
       changedPackages = changedPackages;
       getCommitsForPR = getCommitsForPR;
       getUserByUsername = getUserByUsername;
-      getUserByEmail = getUserByEmail;
       getProjectLabels = getProjectLabels;
       createLabel = createLabel;
       updateLabel = updateLabel;
@@ -82,6 +83,7 @@ jest.mock(
       searchRepo = searchRepo;
       getCommitDate = getCommitDate;
       getFirstCommit = getFirstCommit;
+      getCommit = getCommit;
     }
 );
 
@@ -146,24 +148,11 @@ describe('getVersionMap', () => {
 
 describe('Release', () => {
   beforeEach(() => {
-    getGitLog.mockClear();
-    getPr.mockClear();
-    writeSpy.mockClear();
-    execSpy.mockClear();
-    execSpy.mockClear();
-    createLabel.mockClear();
+    jest.clearAllMocks();
+    getUserByUsername.mockReset();
   });
 
   describe('getCommits', () => {
-    test('should use options owner, repo, and token', async () => {
-      const gh = new Release(git);
-
-      await gh.getCommits('12345');
-
-      expect(constructor.mock.calls[0][0].owner).toBe('Andrew');
-      expect(constructor.mock.calls[0][0].repo).toBe('test');
-    });
-
     test('should default to HEAD', async () => {
       const gh = new Release(git);
       await gh.getCommits('12345');
@@ -185,8 +174,7 @@ describe('Release', () => {
 
       getGitLog.mockReturnValueOnce(commits);
       const gh = new Release(git);
-      await gh.getCommits('12345', '1234');
-      expect(getUserByUsername).not.toHaveBeenCalled();
+      expect(await gh.getCommits('12345', '1234')).toMatchSnapshot();
     });
 
     test('should resolve authors with PR commits', async () => {
@@ -213,17 +201,22 @@ describe('Release', () => {
           }
         ])
       );
-      getUserByUsername.mockReturnValueOnce({
-        login: 'andrew',
-        name: 'Andrew Lisowski'
-      });
-      getUserByEmail.mockReturnValueOnce({
-        login: 'adam',
-        name: 'Adam Dierkens'
-      });
-      getUserByEmail.mockReturnValueOnce({
-        login: 'adam',
-        name: 'Adam Dierkens'
+
+      getCommit.mockReturnValueOnce(
+        Promise.resolve({ data: { author: { login: 'adam' } } })
+      );
+      getUserByUsername.mockImplementation(username => {
+        if (username === 'andrew') {
+          return {
+            login: 'andrew',
+            name: 'Andrew Lisowski'
+          };
+        }
+
+        return {
+          login: 'adam',
+          name: 'Adam Dierkens'
+        };
       });
 
       const gh = new Release(git);
@@ -252,17 +245,22 @@ describe('Release', () => {
           }
         ])
       );
-      getUserByUsername.mockReturnValueOnce({
-        login: 'andrew',
-        name: 'Andrew Lisowski'
-      });
-      getUserByEmail.mockReturnValueOnce({
-        login: 'adam',
-        name: 'Adam Dierkens'
-      });
-      getUserByEmail.mockReturnValueOnce({
-        login: 'adam',
-        name: 'Adam Dierkens'
+
+      getCommit.mockReturnValueOnce(
+        Promise.resolve({ data: { author: { login: 'adam' } } })
+      );
+      getUserByUsername.mockImplementation(username => {
+        if (username === 'andrew') {
+          return {
+            login: 'andrew',
+            name: 'Andrew Lisowski'
+          };
+        }
+
+        return {
+          login: 'adam',
+          name: 'Adam Dierkens'
+        };
       });
 
       const gh = new Release(git);
@@ -310,6 +308,12 @@ describe('Release', () => {
           })
         ])
       );
+      getUserByUsername.mockImplementationOnce(username => {
+        return {
+          login: 'adam',
+          name: 'Adam Dierkens'
+        };
+      });
 
       expect(await gh.getCommits('12345', '1234')).toMatchSnapshot();
     });
@@ -337,6 +341,12 @@ describe('Release', () => {
           })
         ])
       );
+      getUserByUsername.mockImplementationOnce(() => {
+        return {
+          login: 'adam',
+          name: 'Adam Dierkens'
+        };
+      });
 
       expect(await gh.getCommits('12345', '1234')).toMatchSnapshot();
     });
diff --git a/plugins/all-contributors/__tests__/all-contributors.test.ts b/plugins/all-contributors/__tests__/all-contributors.test.ts
index 3ee0da4c..d8b0e1b9 100644
--- a/plugins/all-contributors/__tests__/all-contributors.test.ts
+++ b/plugins/all-contributors/__tests__/all-contributors.test.ts
@@ -64,10 +64,13 @@ describe('All Contributors Plugin', () => {
       lastRelease: '0.0.0',
       releaseNotes: '',
       commits: [
-        makeCommitFromMsg('Do the thing', {
+        {
+          subject: 'Do the thing',
+          hash: '123',
+          labels: [],
           files: ['src/index.ts'],
-          username: 'Jeff'
-        })
+          authors: [{ username: 'Jeff', hash: '123' }]
+        }
       ]
     });
 
@@ -88,10 +91,13 @@ describe('All Contributors Plugin', () => {
       lastRelease: '0.0.0',
       releaseNotes: '',
       commits: [
-        makeCommitFromMsg('Do the thing', {
+        {
+          subject: 'Do the thing',
+          hash: '123',
+          labels: [],
           files: [],
-          username: 'Jeff'
-        })
+          authors: [{ username: 'Jeff', hash: '123' }]
+        }
       ]
     });
 
@@ -111,14 +117,21 @@ describe('All Contributors Plugin', () => {
       lastRelease: '0.0.0',
       releaseNotes: '',
       commits: [
-        makeCommitFromMsg('Do the thing', {
+        {
+          subject: 'Do the thing',
+          hash: '123',
+          labels: [],
           files: ['src/index.ts'],
-          username: 'Jeff'
-        }),
-        makeCommitFromMsg('Do other thing', {
+
+          authors: [{ username: 'Jeff', hash: '123' }]
+        },
+        {
+          subject: 'Do other thing',
+          hash: '123',
+          labels: [],
           files: ['src/index.test.ts'],
-          username: 'Jeff'
-        })
+          authors: [{ username: 'Jeff', hash: '123' }]
+        }
       ]
     });
 
@@ -142,10 +155,13 @@ describe('All Contributors Plugin', () => {
       lastRelease: '0.0.0',
       releaseNotes: '',
       commits: [
-        makeCommitFromMsg('Do the thing', {
+        {
+          subject: 'Do the thing',
+          hash: '123',
+          labels: [],
           files: ['src/index.ts'],
-          username: 'Jeff'
-        })
+          authors: [{ username: 'Jeff', hash: '123' }]
+        }
       ]
     });