hsh19900502 1.0.17 → 1.0.18
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/commands/git.js +3 -3
- package/package.json +1 -1
- package/src/commands/git.ts +3 -3
package/dist/commands/git.js
CHANGED
|
@@ -28,7 +28,7 @@ export const createMR = async () => {
|
|
|
28
28
|
let defaultTitle = '';
|
|
29
29
|
if (branchParts.length >= 2) {
|
|
30
30
|
const commitType = branchParts[0];
|
|
31
|
-
const jiraNumber = branchParts[1]
|
|
31
|
+
const jiraNumber = branchParts[1];
|
|
32
32
|
defaultTitle = `${commitType}: ${jiraNumber}`;
|
|
33
33
|
}
|
|
34
34
|
const question = [
|
|
@@ -36,7 +36,7 @@ export const createMR = async () => {
|
|
|
36
36
|
type: 'input',
|
|
37
37
|
name: 'title',
|
|
38
38
|
message: 'Please enter the MR title:',
|
|
39
|
-
|
|
39
|
+
default: defaultTitle,
|
|
40
40
|
validate(val) {
|
|
41
41
|
if (!val) {
|
|
42
42
|
return 'MR title is required!';
|
|
@@ -47,7 +47,7 @@ export const createMR = async () => {
|
|
|
47
47
|
];
|
|
48
48
|
const answers = await inquirer.prompt(question);
|
|
49
49
|
const fullTitle = defaultTitle ? `${defaultTitle} ${answers.title}` : answers.title;
|
|
50
|
-
await $ `glab mr create --title
|
|
50
|
+
await $ `glab mr create --title=${fullTitle} --remove-source-branch --squash-before-merge -d ''`;
|
|
51
51
|
console.log(chalk.green('MR created successfully!\n'));
|
|
52
52
|
};
|
|
53
53
|
export const branchout = async (branch) => {
|
package/package.json
CHANGED
package/src/commands/git.ts
CHANGED
|
@@ -34,7 +34,7 @@ export const createMR = async () => {
|
|
|
34
34
|
|
|
35
35
|
if (branchParts.length >= 2) {
|
|
36
36
|
const commitType = branchParts[0];
|
|
37
|
-
const jiraNumber = branchParts[1]
|
|
37
|
+
const jiraNumber = branchParts[1];
|
|
38
38
|
defaultTitle = `${commitType}: ${jiraNumber}`;
|
|
39
39
|
}
|
|
40
40
|
|
|
@@ -43,7 +43,7 @@ export const createMR = async () => {
|
|
|
43
43
|
type: 'input',
|
|
44
44
|
name: 'title',
|
|
45
45
|
message: 'Please enter the MR title:',
|
|
46
|
-
|
|
46
|
+
default: defaultTitle,
|
|
47
47
|
validate(val: string) {
|
|
48
48
|
if (!val) {
|
|
49
49
|
return 'MR title is required!';
|
|
@@ -55,7 +55,7 @@ export const createMR = async () => {
|
|
|
55
55
|
|
|
56
56
|
const answers = await inquirer.prompt<{ title: string }>(question);
|
|
57
57
|
const fullTitle = defaultTitle ? `${defaultTitle} ${answers.title}` : answers.title;
|
|
58
|
-
await $`glab mr create --title
|
|
58
|
+
await $`glab mr create --title=${fullTitle} --remove-source-branch --squash-before-merge -d ''`;
|
|
59
59
|
console.log(chalk.green('MR created successfully!\n'));
|
|
60
60
|
}
|
|
61
61
|
|