Repository: intuit/auto
Pull request #680 (2019-11-12 22:31:03)

Rewrite README Issue #666
# What Changed
profile/cli readme updated

# Why
The current readme is what is displayed on NPM, and does not properly represent how cool the tool is

- [x] Add docs



Patch:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 58c0aab5..e4999a68 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,35 +1,3 @@
-# v7.13.3 (Tue Nov 12 2019)
-
-#### 🐛  Bug Fix
-
-- `@auto-it/core`
-  - warn when canary not implemented [#678](https://github.com/intuit/auto/pull/678) ([@hipstersmoothie](https://github.com/hipstersmoothie))
-
-#### 🏠  Internal
-
-- must trust github for docs to publish [#667](https://github.com/intuit/auto/pull/667) ([@hipstersmoothie](https://github.com/hipstersmoothie))
-
-#### 🔩 Dependency Updates
-
-- Bump @octokit/graphql from 4.3.0 to 4.3.1 [#676](https://github.com/intuit/auto/pull/676) ([@dependabot-preview[bot]](https://github.com/dependabot-preview[bot]))
-- Bump file-type from 12.3.1 to 12.4.0 [#675](https://github.com/intuit/auto/pull/675) ([@dependabot-preview[bot]](https://github.com/dependabot-preview[bot]))
-- Bump @typescript-eslint/parser from 2.5.0 to 2.6.1 [#674](https://github.com/intuit/auto/pull/674) ([@dependabot-preview[bot]](https://github.com/dependabot-preview[bot]))
-- Bump eslint-plugin-jest from 23.0.1 to 23.0.3 [#673](https://github.com/intuit/auto/pull/673) ([@dependabot-preview[bot]](https://github.com/dependabot-preview[bot]))
-- Bump prettier from 1.18.2 to 1.19.1 [#672](https://github.com/intuit/auto/pull/672) ([@dependabot-preview[bot]](https://github.com/dependabot-preview[bot]))
-- Bump @types/jest from 24.0.21 to 24.0.22 [#671](https://github.com/intuit/auto/pull/671) ([@dependabot-preview[bot]](https://github.com/dependabot-preview[bot]))
-- Bump @types/node-fetch from 2.5.2 to 2.5.3 [#669](https://github.com/intuit/auto/pull/669) ([@dependabot-preview[bot]](https://github.com/dependabot-preview[bot]))
-- `auto`
-  - Bump chalk from 2.4.2 to 3.0.0 [#670](https://github.com/intuit/auto/pull/670) ([@dependabot-preview[bot]](https://github.com/dependabot-preview[bot]))
-- `@auto-it/all-contributors`
-  - Bump all-contributors-cli from 6.9.3 to 6.10.0 [#677](https://github.com/intuit/auto/pull/677) ([@dependabot-preview[bot]](https://github.com/dependabot-preview[bot]))
-
-#### Authors: 2
-
-- [@dependabot-preview[bot]](https://github.com/dependabot-preview[bot])
-- Andrew Lisowski ([@hipstersmoothie](https://github.com/hipstersmoothie))
-
----
-
 # v7.13.2 (Sun Nov 10 2019)
 
 #### 📝  Documentation
diff --git a/docs/pages/autorc.md b/docs/pages/autorc.md
index ae02e156..1d70f251 100644
--- a/docs/pages/autorc.md
+++ b/docs/pages/autorc.md
@@ -2,7 +2,7 @@
 
 All options for the CLI tools can also be configured via the `.autorc`. As CLI options you supply them in snake-case (`--foo-bar`), but as `.autorc` options you supply them in camelCase (`fooBar`),
 
-We use [cosmiconfig](https://github.com/davidtheclark/cosmiconfig) to find your config. This means you can define this file a variety of ways. Our `cosmiconfig` setup is a little custom and will start at the root of your project and start to search up the directory tree for the following:
+We use [cosmiconfig](https://github.com/davidtheclark/cosmiconfig) to find your config, so that means you can define this file a variety of ways. Our Cosmiconfig setup is a little custom and will start at the root of your project and start to search up the directory tree for the following:
 
 - a JSON or YAML, extension-less "rc file"
 - an "rc file" with the extensions `.json`, `.yaml`, or `.yml`
diff --git a/lerna.json b/lerna.json
index 9f68125d..440a8b7c 100644
--- a/lerna.json
+++ b/lerna.json
@@ -1,5 +1,5 @@
 {
-  "version": "7.13.3",
+  "version": "7.13.2",
   "npmClient": "yarn",
   "useWorkspaces": true,
   "packages": [
diff --git a/package.json b/package.json
index a9ae5eef..87bda8f5 100644
--- a/package.json
+++ b/package.json
@@ -55,7 +55,7 @@
     "eslint-plugin-prettier": "^3.1.1",
     "graphql": "^14.2.1",
     "husky": "^3.0.3",
-    "ignite": "^1.10.6",
+    "ignite": "^1.10.5",
     "jest": "~24.9.0",
     "jest-serializer-path": "^0.1.15",
     "lerna": "^3.13.4",
diff --git a/packages/cli/README.md b/packages/cli/README.md
index 453750e0..f6da01fa 100644
--- a/packages/cli/README.md
+++ b/packages/cli/README.md
@@ -1,8 +1,32 @@
 # auto CLI
 
-Generate releases based on semantic version labels on pull requests
+`auto` is a tool designed to seamlessly automate the release workflow. It is powered by semantic version labels on pull requests, so does not require you to change your code or make drastic changes to your current workflow. 
 
-```sh
+While intended to run in a continuous integration (CI) environment, all `auto` commands can run locally as well.
+
+## Installation
+
+```
+$ npm install auto
+```
+
+## Getting Started
+
+Interactive setup for most configurable options
+
+```
+$ auto init
+```
+
+Create your project's labels on github. If labels already exist, it will update them.
+
+```
+$ auto create-labels
+```
+
+## Usage
+
+```
 $ auto -h
 
 Synopsis
@@ -24,8 +48,8 @@ Release Commands
               1. call from base branch -> latest version released
               2. call from PR in CI -> canary version released
               3. call locally when not on base branch -> canary version released
-  canary      Make a canary release of the project. Useful on PRs. If ran locally, `canary` will release a canary version for
-              your current git HEAD.
+  canary      Make a canary release of the project. Useful on PRs. If ran locally, `canary` will release  
+              a canary version for your current git HEAD.
 
               1. In PR: 1.2.3-canary.123.0 + add version to PR body
               2. Locally: 1.2.3-canary.1810cfd
@@ -35,13 +59,15 @@ Pull Request Interaction Commands
   label      Get the labels for a pull request
   pr-check   Check that a pull request has a SemVer label
   pr         Set the status on a PR commit
-  comment    Comment on a pull request with a markdown message. Each comment has a context, and each context only has one
-             comment.
-  pr-body    Update the body of a PR with a message. Appends to PR and will not overwrite user content. Each comment has a
-             context, and each context only has one comment.
+  comment    Comment on a pull request with a markdown message. Each comment has a context, and each                 
+             context only has one comment.
+  pr-body    Update the body of a PR with a message. Appends to PR and will not overwrite user content.              
+             Each comment has a context, and each context only has one comment.
+```
 
-Global Options
+## Available Global Options
 
+```
   -V, --version         Display auto's version
   -h, --help            Display the help output for the command
   -v, --verbose         Show some more logs
diff --git a/packages/cli/package.json b/packages/cli/package.json
index 87090378..d0121c20 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": "7.13.3",
+  "version": "7.13.2",
   "author": {
     "name": "Andrew Lisowski",
     "email": "lisowski54@gmail.com"
diff --git a/packages/core/package.json b/packages/core/package.json
index fcfe1907..498d3c64 100644
--- a/packages/core/package.json
+++ b/packages/core/package.json
@@ -1,6 +1,6 @@
 {
   "name": "@auto-it/core",
-  "version": "7.13.3",
+  "version": "7.13.2",
   "description": "Node API for using auto.",
   "main": "dist/auto.js",
   "author": {
diff --git a/packages/core/src/auto.ts b/packages/core/src/auto.ts
index 4d511242..86277a99 100644
--- a/packages/core/src/auto.ts
+++ b/packages/core/src/auto.ts
@@ -11,7 +11,6 @@ import {
   SyncWaterfallHook,
   AsyncSeriesHook
 } from 'tapable';
-import dedent from 'dedent';
 
 import HttpsProxyAgent from 'https-proxy-agent';
 import {
@@ -104,7 +103,7 @@ export interface IAutoHooks {
     string
   >;
   /** Get owner and repository. Typically from a package distribution description file. */
-  getRepository: AsyncSeriesBailHook<[], (IRepoOptions & TestingToken) | void>;
+  getRepository: AsyncSeriesBailHook<[], IRepoOptions & TestingToken | void>;
   /** Tap into the things the Release class makes. This isn't the same as `auto release`, but the main class that does most of the work. */
   onCreateRelease: SyncHook<[Release]>;
   /** This is where you hook into the LogParse's hooks. This hook is exposed for convenience on during `this.hooks.onCreateRelease` and at the root `this.hooks` */
@@ -585,17 +584,6 @@ export default class Auto {
       throw this.createErrorMessage();
     }
 
-    if (!this.hooks.canary.isUsed()) {
-      this.logger.log.error(dedent`
-        None of the plugins that you are using implement the \`canary\` command!
-
-        "canary" releases are versions that are used solely to test changes. They make sense on some platforms (ex: npm) but not all!
-        
-        If you think your package manager has the ability to support canaries please file an issue or submit a pull request,
-      `);
-      process.exit(1);
-    }
-
     // SailEnv falls back to commit SHA
     let pr: string | undefined;
     let build: string | undefined;
diff --git a/plugins/all-contributors/package.json b/plugins/all-contributors/package.json
index 6d796242..031f97f9 100644
--- a/plugins/all-contributors/package.json
+++ b/plugins/all-contributors/package.json
@@ -1,6 +1,6 @@
 {
   "name": "@auto-it/all-contributors",
-  "version": "7.13.3",
+  "version": "7.13.2",
   "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 af139dfa..974b2393 100644
--- a/plugins/chrome/package.json
+++ b/plugins/chrome/package.json
@@ -1,6 +1,6 @@
 {
   "name": "@auto-it/chrome",
-  "version": "7.13.3",
+  "version": "7.13.2",
   "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 0531c39e..7b41da6f 100644
--- a/plugins/conventional-commits/package.json
+++ b/plugins/conventional-commits/package.json
@@ -1,6 +1,6 @@
 {
   "name": "@auto-it/conventional-commits",
-  "version": "7.13.3",
+  "version": "7.13.2",
   "main": "dist/index.js",
   "description": "Conventional commit plugin for auto",
   "author": {
diff --git a/plugins/crates/package.json b/plugins/crates/package.json
index 2eb7191a..aaeb7bd6 100644
--- a/plugins/crates/package.json
+++ b/plugins/crates/package.json
@@ -1,6 +1,6 @@
 {
   "name": "@auto-it/crates",
-  "version": "7.13.3",
+  "version": "7.13.2",
   "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 a0e7896a..ef16ccc9 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": "7.13.3",
+  "version": "7.13.2",
   "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 223e858f..d254ba3e 100644
--- a/plugins/git-tag/package.json
+++ b/plugins/git-tag/package.json
@@ -1,6 +1,6 @@
 {
   "name": "@auto-it/git-tag",
-  "version": "7.13.3",
+  "version": "7.13.2",
   "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 6035626e..e10ce540 100644
--- a/plugins/jira/package.json
+++ b/plugins/jira/package.json
@@ -1,6 +1,6 @@
 {
   "name": "@auto-it/jira",
-  "version": "7.13.3",
+  "version": "7.13.2",
   "main": "dist/index.js",
   "description": "Jira plugin for auto",
   "author": {
diff --git a/plugins/maven/package.json b/plugins/maven/package.json
index 16e18b2d..45cb7b7d 100644
--- a/plugins/maven/package.json
+++ b/plugins/maven/package.json
@@ -1,6 +1,6 @@
 {
   "name": "@auto-it/maven",
-  "version": "7.13.3",
+  "version": "7.13.2",
   "main": "dist/index.js",
   "description": "Maven publishing plugin for auto",
   "author": {
diff --git a/plugins/npm/package.json b/plugins/npm/package.json
index 7026d33b..60158b94 100644
--- a/plugins/npm/package.json
+++ b/plugins/npm/package.json
@@ -1,6 +1,6 @@
 {
   "name": "@auto-it/npm",
-  "version": "7.13.3",
+  "version": "7.13.2",
   "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 9178281d..1766ef3e 100644
--- a/plugins/omit-commits/package.json
+++ b/plugins/omit-commits/package.json
@@ -1,6 +1,6 @@
 {
   "name": "@auto-it/omit-commits",
-  "version": "7.13.3",
+  "version": "7.13.2",
   "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 2a810de3..826f3109 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": "7.13.3",
+  "version": "7.13.2",
   "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 c2f009fb..0b90aed2 100644
--- a/plugins/released/package.json
+++ b/plugins/released/package.json
@@ -1,6 +1,6 @@
 {
   "name": "@auto-it/released",
-  "version": "7.13.3",
+  "version": "7.13.2",
   "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 9b6da36d..ef4cce7d 100644
--- a/plugins/s3/package.json
+++ b/plugins/s3/package.json
@@ -1,6 +1,6 @@
 {
   "name": "@auto-it/s3",
-  "version": "7.13.3",
+  "version": "7.13.2",
   "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 b16de9fb..ba225a1c 100644
--- a/plugins/slack/package.json
+++ b/plugins/slack/package.json
@@ -1,6 +1,6 @@
 {
   "name": "@auto-it/slack",
-  "version": "7.13.3",
+  "version": "7.13.2",
   "main": "dist/index.js",
   "description": "Slack plugin for auto",
   "author": {
diff --git a/plugins/twitter/package.json b/plugins/twitter/package.json
index acf73c46..9dc1a209 100644
--- a/plugins/twitter/package.json
+++ b/plugins/twitter/package.json
@@ -1,6 +1,6 @@
 {
   "name": "@auto-it/twitter",
-  "version": "7.13.3",
+  "version": "7.13.2",
   "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 aa5ce988..bd53ecea 100644
--- a/plugins/upload-assets/package.json
+++ b/plugins/upload-assets/package.json
@@ -1,6 +1,6 @@
 {
   "name": "@auto-it/upload-assets",
-  "version": "7.13.3",
+  "version": "7.13.2",
   "main": "dist/index.js",
   "description": "Upload assets plugin for auto",
   "author": {
diff --git a/yarn.lock b/yarn.lock
index ca9ce486..ae1db9f1 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -7880,10 +7880,10 @@ iferr@^0.1.5:
   resolved "https://registry.yarnpkg.com/iferr/-/iferr-0.1.5.tgz#c60eed69e6d8fdb6b3104a1fcbca1c192dc5b501"
   integrity sha1-xg7taebY/bazEEofy8ocGS3FtQE=
 
-ignite@^1.10.6:
-  version "1.10.6"
-  resolved "https://registry.yarnpkg.com/ignite/-/ignite-1.10.6.tgz#7437adb122add8eb87ad5371ff31407e7b3a11c4"
-  integrity sha512-kfn+Ayc2YdgsmKBWjPEAyqP50rdo7K51gy2Fs6QMKuCnRHbMPM8VQmf8OLndNMXriH9i3JGjUn2KOuhRUlsIgg==
+ignite@^1.10.5:
+  version "1.10.5"
+  resolved "https://registry.yarnpkg.com/ignite/-/ignite-1.10.5.tgz#08f63b2ed0153f1784a1f11c716e793595410eab"
+  integrity sha512-g2qsPS6asvtN9hLus1lPWdipcB6cz3ZA3q5QaJgqyVBIf0BhGlClQp/YoVnhHM68z4bsqsXDYl3EtMJ4cd6g3w==
   dependencies:
     "@babel/cli" "7.2.0"
     "@babel/core" "7.2.0"


Test patch:
diff --git a/packages/core/src/__tests__/auto-canary-in-pr-ci.test.ts b/packages/core/src/__tests__/auto-canary-in-pr-ci.test.ts
index 05b1c9c5..86d08791 100644
--- a/packages/core/src/__tests__/auto-canary-in-pr-ci.test.ts
+++ b/packages/core/src/__tests__/auto-canary-in-pr-ci.test.ts
@@ -51,24 +51,6 @@ describe('canary in ci', () => {
     expect(version!.newVersion).toBe('1.2.4-canary.123.1');
   });
 
-  test('should fail when canaries not implemented', async () => {
-    const auto = new Auto({ ...defaults, plugins: [] });
-
-    // @ts-ignore
-    jest.spyOn(process, 'exit').mockImplementationOnce(() => {});
-    auto.logger = dummyLog();
-    await auto.loadConfig();
-    auto.git!.getLatestRelease = () => Promise.resolve('1.2.3');
-    auto.release!.getCommitsInRelease = () =>
-      Promise.resolve([makeCommitFromMsg('Test Commit')]);
-    const addToPrBody = jest.fn();
-    auto.git!.addToPrBody = addToPrBody;
-    jest.spyOn(auto.release!, 'getCommits').mockImplementation();
-
-    await auto.canary({ pr: 123, build: 1, message: 'false' });
-    expect(process.exit).toHaveBeenCalled();
-  });
-
   test('should not comment when passed "false"', async () => {
     const auto = new Auto({ ...defaults, plugins: [] });
     auto.logger = dummyLog();
@@ -79,7 +61,6 @@ describe('canary in ci', () => {
     const addToPrBody = jest.fn();
     auto.git!.addToPrBody = addToPrBody;
     jest.spyOn(auto.release!, 'getCommits').mockImplementation();
-    auto.hooks.canary.tap('test', (bump, post) => `1.2.4-canary${post}`);
 
     await auto.canary({ pr: 123, build: 1, message: 'false' });
     expect(addToPrBody).not.toHaveBeenCalled();