auto-release-cli
Advanced tools
Comparing version 0.30.0 to 0.31.0
@@ -0,1 +1,11 @@ | ||
# 0.31.0 (Sun Dec 16 2018) | ||
#### 🚀 Enhancement | ||
- init flag to just get labels [#74](https://github.com/intuit/auto-release/pull/74) ([@hipstersmoothie](https://github.com/hipstersmoothie)) | ||
#### Authors: 1 | ||
- Andrew Lisowski ([@hipstersmoothie](https://github.com/hipstersmoothie)) | ||
--- | ||
# 0.30.0 (Sun Dec 16 2018) | ||
@@ -2,0 +12,0 @@ |
@@ -43,2 +43,5 @@ export default function parseArgs(testArgs?: string[]): void | ArgsType; | ||
} | ||
export interface IInitArgs { | ||
'only-labels'?: boolean; | ||
} | ||
export interface ILogArgs { | ||
@@ -50,2 +53,2 @@ verbose?: boolean; | ||
command: string; | ||
} & ISemverArgs & IRepoArgs & IChangelogArgs & IReleaseArgs & ICommentArgs & IPRArgs & ILogArgs & IOwnerArgs; | ||
} & ISemverArgs & IRepoArgs & IChangelogArgs & IReleaseArgs & ICommentArgs & IPRArgs & ILogArgs & IOwnerArgs & IInitArgs; |
@@ -173,3 +173,11 @@ "use strict"; | ||
summary: 'Interactive setup for most configurable options', | ||
examples: ['{green $} auto init'] | ||
examples: ['{green $} auto init'], | ||
options: [ | ||
{ | ||
name: 'only-labels', | ||
type: Boolean, | ||
group: 'main', | ||
description: 'Only run init for the labels. As most other options are for advanced users' | ||
} | ||
] | ||
}, | ||
@@ -411,7 +419,10 @@ { | ||
} | ||
sections.push({ | ||
header: 'Global Options', | ||
optionList: command.options, | ||
group: 'misc' | ||
}); | ||
var hasGlobalOptions = command.options.filter(function (option) { return option.group === 'misc'; }); | ||
if (hasGlobalOptions.length > 0) { | ||
sections.push({ | ||
header: 'Global Options', | ||
optionList: command.options, | ||
group: 'misc' | ||
}); | ||
} | ||
} | ||
@@ -470,2 +481,3 @@ sections.push({ | ||
} | ||
console.log(autoOptions); | ||
return autoOptions; | ||
@@ -472,0 +484,0 @@ } |
@@ -1,1 +0,1 @@ | ||
export default function init(): Promise<void>; | ||
export default function init(onlyLabels?: boolean): Promise<void>; |
@@ -243,16 +243,23 @@ "use strict"; | ||
} | ||
function init() { | ||
function init(onlyLabels) { | ||
return __awaiter(this, void 0, void 0, function () { | ||
var flags, labels, changelogTitles, autoRc; | ||
return __generator(this, function (_a) { | ||
switch (_a.label) { | ||
case 0: return [4 /*yield*/, getFlags()]; | ||
case 1: | ||
flags = _a.sent(); | ||
var flags, _a, labels, changelogTitles, autoRc; | ||
return __generator(this, function (_b) { | ||
switch (_b.label) { | ||
case 0: | ||
if (!onlyLabels) return [3 /*break*/, 1]; | ||
_a = {}; | ||
return [3 /*break*/, 3]; | ||
case 1: return [4 /*yield*/, getFlags()]; | ||
case 2: | ||
_a = _b.sent(); | ||
_b.label = 3; | ||
case 3: | ||
flags = _a; | ||
return [4 /*yield*/, getLabels()]; | ||
case 2: | ||
labels = _a.sent(); | ||
case 4: | ||
labels = _b.sent(); | ||
return [4 /*yield*/, getChangelogTitles()]; | ||
case 3: | ||
changelogTitles = _a.sent(); | ||
case 5: | ||
changelogTitles = _b.sent(); | ||
autoRc = Object.entries(__assign({}, flags, { labels: labels, | ||
@@ -273,4 +280,4 @@ changelogTitles: changelogTitles })).reduce(function (all, _a) { | ||
return [4 /*yield*/, writeFile(path.join(process.cwd(), '.autorc'), JSON.stringify(autoRc, null, 2))]; | ||
case 4: | ||
_a.sent(); | ||
case 6: | ||
_b.sent(); | ||
return [2 /*return*/]; | ||
@@ -277,0 +284,0 @@ } |
@@ -324,3 +324,3 @@ #!/usr/bin/env node | ||
return [3 /*break*/, 44]; | ||
case 3: return [4 /*yield*/, init_1.default()]; | ||
case 3: return [4 /*yield*/, init_1.default(args['only-labels'])]; | ||
case 4: | ||
@@ -327,0 +327,0 @@ _c.sent(); |
{ | ||
"name": "auto-release-cli", | ||
"description": "CLI tools to help facilitate semantic versioning based on Github PR labels.", | ||
"version": "0.30.0", | ||
"version": "0.31.0", | ||
"author": { | ||
@@ -6,0 +6,0 @@ "name": "Andrew Lisowski", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
250560
3281