@harryisfish/gitt 1.6.3 → 1.6.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +3 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -86,11 +86,12 @@ async function main() {
|
|
|
86
86
|
program
|
|
87
87
|
.option('-i, --interactive', 'Interactive mode: Select branches to delete')
|
|
88
88
|
.option('-d, --dry-run', 'Dry run: Show what would be deleted without deleting')
|
|
89
|
-
.option('--stale [days]', 'Find stale branches (default: 90 days)'
|
|
89
|
+
.option('--stale [days]', 'Find stale branches (default: 90 days)')
|
|
90
90
|
.action(async (options) => {
|
|
91
91
|
await checkGitRepo();
|
|
92
|
-
|
|
92
|
+
// options.stale is undefined when not passed, true when passed without value, or a string when passed with value
|
|
93
93
|
const isStale = options.stale !== undefined;
|
|
94
|
+
const staleDays = options.stale === true || options.stale === undefined ? 90 : parseInt(options.stale, 10);
|
|
94
95
|
await (0, clean_1.cleanDeletedBranches)({
|
|
95
96
|
interactive: options.interactive || false,
|
|
96
97
|
dryRun: options.dryRun || false,
|
package/package.json
CHANGED