File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,8 @@ const Tasks = require('./include/tasks');
99program
1010 .arguments('[project] [id]')
1111 .option('-t, --type <type>', 'specify resource type: issue, merge_request')
12+ .option('-m', 'shorthand for --type=merge_request')
13+ .option('-i', 'shorthand for --type=issue')
1214 .option('--verbose', 'show verbose output')
1315 .parse(process.argv);
1416
@@ -20,6 +22,12 @@ let config = new Config(process.cwd()),
2022 id = program.args.length === 1 ? parseInt(program.args[0]) : parseInt(program.args[1]),
2123 project = program.args.length === 2 ? program.args[0] : null;
2224
25+ if (program.I) {
26+ type = 'issue';
27+ } else if (program.M) {
28+ type = 'merge_request';
29+ }
30+
2331if (program.args.length < 2 && !config.get('project'))
2432 Cli.error('No project set');
2533
You can’t perform that action at this time.
0 commit comments