diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..704305c --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,29 @@ +**Changes proposed in this pull request:** + +* [Change 1] +* [Change 2] +* [Other changes...] + +**Public description:** + +[Public description of the changes to include in changelog, typically one line will suffice] + +[Glossy screenshots if available for the changelog] + +- [ ] Internal Improvement (no customer impact) +- [ ] Hide from Changelog + +**Have you made sure to add:** +- [ ] Tests +- [ ] Documentation + +**Supplemental Screenshots and GIFs** + +[Insert screenshot or GIFs of old and new behavior to assist reviewers] + +**Steps to Review** + +See https://www.notion.so/formspree/Code-Reviews-78c7d523c4424f66a399367a6738ae13 + +**Any Additional Information or Deployment Notes** + diff --git a/src/cmds/deploy.js b/src/cmds/deploy.js index ab89040..4202cc8 100644 --- a/src/cmds/deploy.js +++ b/src/cmds/deploy.js @@ -60,7 +60,8 @@ exports.builder = yargs => { yargs.option('force', { alias: 'f', - describe: 'Skip verifying that secrets reference environment variables', + describe: + 'Skip verifying that secrets reference environment variables and force the deployment via the API', type: 'boolean', default: false }); @@ -169,6 +170,7 @@ exports.handler = async args => { const response = await deploy.request({ endpoint, config, + force: args.force, key, userAgent }); diff --git a/test/cmds/deploy.test.js b/test/cmds/deploy.test.js index 8903ad3..7f4bb8a 100644 --- a/test/cmds/deploy.test.js +++ b/test/cmds/deploy.test.js @@ -29,6 +29,7 @@ afterEach(() => { it('sends a deploy request with the right params', async () => { deploy.request.mockImplementation(params => { expect(params.config).toStrictEqual({}); + expect(params.force).toBe(false); expect(params.key).toBe('xxx'); expect(params.userAgent).toBe(`@formspree/cli@${version}`); @@ -171,6 +172,7 @@ it('skips validating inline secrets with force flag', async () => { deploy.request.mockImplementation(params => { expect(params.config.apiKey).toBe('my-inline-key'); + expect(params.force).toBe(true); return Promise.resolve({ status: 200, data: { id: 'xxxx-xxxx-xxxx', shim: null }