From 88545787935d86ce9d4a23ad82a31f3b97ec35ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Ch=C5=82odnicki?= Date: Wed, 1 Jul 2020 17:25:43 +0200 Subject: [PATCH] fix(types): make setCommits.repo type optional When "auto: true" then "repo" is optional. Resolves #199 --- README.md | 6 +++--- index.d.ts | 4 +++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 0667c319..2b36c78d 100644 --- a/README.md +++ b/README.md @@ -88,10 +88,10 @@ entries | `array`/`RegExp`/`function(key: string): bool` | optional | a filter f | Option | Type | Required | Description | ---------|------|----------|------------- -| repo | `string` | required | the full git repo name as defined in Sentry | -| commit | `string` | optional/required | the current (last) commit in the release | +| repo | `string` | optional/required | the full git repo name as defined in Sentry. Required if `auto` option is not `true`. | +| commit | `string` | optional/required | the current (last) commit in the release. Required if `auto` option is not `true`. | | previousCommit | `string` | optional | the commit before the beginning of this release (in other words, the last commit of the previous release). If omitted, this will default to the last commit of the previous release in Sentry. If there was no previous release, the last 10 commits will be used | -| auto | `boolean` | optional/required | automatically choose the associated commit (uses the current commit). Overrides other options | +| auto | `boolean` | optional | automatically choose the associated commit (uses the current commit). Overrides other options | #### options.deploy: diff --git a/index.d.ts b/index.d.ts index 9fe38461..aad7b1c4 100644 --- a/index.d.ts +++ b/index.d.ts @@ -120,11 +120,13 @@ export interface SentryCliPluginOptions { setCommits?: { /** * The full repo name as defined in Sentry. + * Required if auto option is not true. */ - repo: string; + repo?: string; /** * The current (last) commit in the release. + * Required if auto option is not true. */ commit?: string;