Repository: intuit/auto (ts)

Issue:
Repository missing tags - fatal: No names found, cannot describe anything
**Describe the bug**
If you use auto for a project which has not pushed any tags you get the following misleading error: `fatal: No names found, cannot describe anything.`. 

Here's what our build on Circle CI produces:

```
✔  success   Updated body on PR #50
✔  success   Published canary version: 4.8.0-canary.50.390
Error: Running command 'git' failed

fatal: No names found, cannot describe anything.
```

After looking at the code it's due to the [git describe](https://github.com/intuit/auto/blob/d1a11ee91aa80e3e18582059654aa87fa3e098e5/packages/core/src/git.ts#L577). 

After googling  I found a stack overflow with a [possible solution](https://stackoverflow.com/questions/4916492/git-describe-fails-with-fatal-no-names-found-cannot-describe-anything).
 
**To Reproduce**
Use auto with a repository which has never pushed any tags. 


Pull request:
Canary: fallback to first commit if now tags exist
# What Changed

When trying to make the very first canary release auto would error out.

# Why

closes #554

Todo:

- [x] Add tests

<!-- GITHUB_RELEASE PR BODY: canary-version -->
Published PR with canary version: `7.4.5-canary.560.7245.0`
<!-- GITHUB_RELEASE PR BODY: canary-version -->


Patch:
diff --git a/packages/core/src/auto.ts b/packages/core/src/auto.ts
index fbd42a85..5c9bf1b6 100644
--- a/packages/core/src/auto.ts
+++ b/packages/core/src/auto.ts
@@ -586,7 +586,14 @@ export default class Auto {
       );
     }
 
-    const latestTag = await this.git.getLatestTagInBranch();
+    let latestTag: string;
+
+    try {
+      latestTag = await this.git.getLatestTagInBranch();
+    } catch (error) {
+      latestTag = await this.git.getFirstCommit();
+    }
+
     const commitsInRelease = await this.release.getCommits(latestTag);
     return { newVersion, commitsInRelease };
   }


Test patch:
diff --git a/packages/core/src/__tests__/auto.test.ts b/packages/core/src/__tests__/auto.test.ts
index e82a52a9..cfdeae5f 100644
--- a/packages/core/src/__tests__/auto.test.ts
+++ b/packages/core/src/__tests__/auto.test.ts
@@ -790,6 +790,29 @@ describe('Auto', () => {
       expect(auto.git!.addToPrBody).toHaveBeenCalled();
     });
 
+    test.only('falls back to first commit', async () => {
+      const auto = new Auto({ ...defaults, plugins: [] });
+      auto.logger = dummyLog();
+      await auto.loadConfig();
+      auto.git!.getLatestTagInBranch = () => {
+        throw new Error();
+      };
+      auto.git!.getLatestRelease = () => Promise.resolve('1.2.3');
+      auto.git!.getSha = () => Promise.resolve('abc');
+      auto.release!.getCommits = () => Promise.resolve([]);
+      auto.git!.getFirstCommit = () => Promise.resolve('abcd');
+      auto.git!.addToPrBody = jest.fn();
+      auto.release!.getCommitsInRelease = jest
+        .fn()
+        .mockReturnValue(Promise.resolve([makeCommitFromMsg('Test Commit')]));
+      const canary = jest.fn();
+      auto.hooks.canary.tap('test', canary);
+      auto.release!.getCommits = jest.fn();
+
+      await auto.canary({ pr: 123, build: 1 });
+      expect(auto.release!.getCommits).toHaveBeenCalledWith('abcd');
+    });
+
     test('adds sha if no pr or build number is found', async () => {
       const auto = new Auto({ ...defaults, plugins: [] });
       auto.logger = dummyLog();