From f908b9a120f1e067f9c42d0d6082352946070f9d Mon Sep 17 00:00:00 2001 From: Andrew Lisowski Date: Fri, 14 Aug 2020 12:28:57 -0700 Subject: [PATCH 1/4] add more release plugins to init --- packages/core/src/init.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/core/src/init.ts b/packages/core/src/init.ts index f3412a4a1..655f53d42 100644 --- a/packages/core/src/init.ts +++ b/packages/core/src/init.ts @@ -169,11 +169,15 @@ async function getCustomizedDefaultLabels() { /** Get the plugins the user wants to use */ async function getPlugins() { const releasePlugins = { + Homebrew: "brew", "Chrome Web Store": "chrome", + Cocoapod: "cocoapod", "Rust Crate": "crates", + "Ruby Gem": "gem", "Git Tag": "git-tag", - "npm Package": "npm", + Gradle: "Gradle", Maven: "maven", + npm: "npm", }; const releasePlugin = await prompt({ From b681f27591472781f4f5a20ac287a3bdab28d89c Mon Sep 17 00:00:00 2001 From: Andrew Lisowski Date: Fri, 14 Aug 2020 12:30:14 -0700 Subject: [PATCH 2/4] no need to init enterprise graphql api --- packages/core/src/init.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/packages/core/src/init.ts b/packages/core/src/init.ts index 655f53d42..2c9e53449 100644 --- a/packages/core/src/init.ts +++ b/packages/core/src/init.ts @@ -294,11 +294,11 @@ async function createEnv(hook: InteractiveInitHooks["createEnv"]) { } } -type SnippetResponse = Record< +type SnippetResponse = Record< Key, { /** The response from the user */ - values: ReponseValue; + values: ResponseValue; } >; @@ -436,9 +436,7 @@ export default class InteractiveInit { message: `What are the api URLs for your GitHub enterprise instance?`, required: true, // @ts-ignore - template: endent` - GitHub API: #{githubApi} - Graphql API: #{githubGraphqlApi}`, + template: `GitHub API: #{githubApi}`, }); autoRc = { ...autoRc, ...response.repoInfo.values }; From d81bd3faad658b7f441daf992b138c2b24696de3 Mon Sep 17 00:00:00 2001 From: Andrew Lisowski Date: Fri, 14 Aug 2020 12:31:08 -0700 Subject: [PATCH 3/4] fix getting label from user --- packages/core/src/init.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/core/src/init.ts b/packages/core/src/init.ts index 2c9e53449..32c22cf01 100644 --- a/packages/core/src/init.ts +++ b/packages/core/src/init.ts @@ -57,7 +57,7 @@ async function getLabel(label?: ILabelDefinition) { /** Response value */ value: { /** Snippet values */ - values: [ILabelDefinition]; + values: ILabelDefinition; }; } @@ -114,7 +114,7 @@ async function getLabel(label?: ILabelDefinition) { }, }); - return response.value.values[0]; + return response.value.values; } /** Get any custom labels from the user */ From 82fec12397eff459ebe9e8dbfc8c2e8b36f42bcf Mon Sep 17 00:00:00 2001 From: Andrew Lisowski Date: Fri, 14 Aug 2020 12:32:49 -0700 Subject: [PATCH 4/4] add color to label prompt so we can detect differences between base label --- packages/core/src/init.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/core/src/init.ts b/packages/core/src/init.ts index 32c22cf01..3311cc9f6 100644 --- a/packages/core/src/init.ts +++ b/packages/core/src/init.ts @@ -75,12 +75,14 @@ async function getLabel(label?: ILabelDefinition) { } description: #{description:${label.description}}, releaseType: #{releaseType:${label.releaseType}} + color: #{color:${label.color}} }` : endent`{ name: #{name}, changelogTitle: #{changelogTitle}, description: #{description}, - releaseType: #{releaseType} + releaseType: #{releaseType}, + color: #{color} }`, /** Check if returned config is valid */ // @ts-ignore