@snapcommit/cli 3.9.13 ā 3.9.15
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.
|
@@ -767,6 +767,8 @@ async function executeGitHubCommand(intent) {
|
|
|
767
767
|
try {
|
|
768
768
|
switch (intent.action) {
|
|
769
769
|
case 'pr_create':
|
|
770
|
+
case 'create_pr':
|
|
771
|
+
case 'new_pr':
|
|
770
772
|
const isDraft = intent.options?.draft || false;
|
|
771
773
|
console.log(chalk_1.default.blue(`\nš Creating ${isDraft ? 'draft ' : ''}PR...`));
|
|
772
774
|
const pr = await github.createPullRequest(intent.options || {});
|
|
@@ -829,12 +831,16 @@ async function executeGitHubCommand(intent) {
|
|
|
829
831
|
}
|
|
830
832
|
break;
|
|
831
833
|
case 'issue_create':
|
|
834
|
+
case 'create_issue':
|
|
835
|
+
case 'new_issue':
|
|
832
836
|
console.log(chalk_1.default.blue('\nš Creating issue...'));
|
|
833
837
|
const issue = await github.createIssue(intent.options || {});
|
|
834
838
|
console.log(chalk_1.default.green(`ā Issue #${issue.number} created`));
|
|
835
839
|
console.log(chalk_1.default.cyan(` ${issue.html_url}\n`));
|
|
836
840
|
break;
|
|
837
841
|
case 'issue_list':
|
|
842
|
+
case 'list_issues':
|
|
843
|
+
case 'show_issues':
|
|
838
844
|
const issues = await github.listIssues({ state: 'open', limit: 10 });
|
|
839
845
|
if (issues.length === 0) {
|
|
840
846
|
console.log(chalk_1.default.gray('\nā No open issues\n'));
|
|
@@ -848,6 +854,7 @@ async function executeGitHubCommand(intent) {
|
|
|
848
854
|
}
|
|
849
855
|
break;
|
|
850
856
|
case 'issue_close':
|
|
857
|
+
case 'close_issue':
|
|
851
858
|
const closeIssueNum = intent.target || intent.options?.number;
|
|
852
859
|
if (!closeIssueNum) {
|
|
853
860
|
console.log(chalk_1.default.red('\nā Issue number required\n'));
|
|
@@ -969,6 +976,9 @@ async function executeGitHubCommand(intent) {
|
|
|
969
976
|
}
|
|
970
977
|
break;
|
|
971
978
|
case 'pr_diff':
|
|
979
|
+
case 'pr_changes':
|
|
980
|
+
case 'show_pr_diff':
|
|
981
|
+
case 'what_changed':
|
|
972
982
|
let diffPrNum = intent.target || intent.options?.number;
|
|
973
983
|
// Smart PR detection: "what changed in my PR"
|
|
974
984
|
if (!diffPrNum) {
|
|
@@ -1024,10 +1034,16 @@ async function executeGitHubCommand(intent) {
|
|
|
1024
1034
|
case 'pr_merge_auto':
|
|
1025
1035
|
case 'auto_merge':
|
|
1026
1036
|
case 'enable_auto_merge':
|
|
1027
|
-
|
|
1037
|
+
case 'pr_auto_merge_enable':
|
|
1038
|
+
case 'auto_merge_enable':
|
|
1039
|
+
let autoMergePrNum = intent.target || intent.options?.number;
|
|
1040
|
+
// Smart PR detection: "auto merge this PR"
|
|
1028
1041
|
if (!autoMergePrNum) {
|
|
1029
|
-
|
|
1030
|
-
|
|
1042
|
+
autoMergePrNum = await github.findPRNumber('current');
|
|
1043
|
+
if (!autoMergePrNum) {
|
|
1044
|
+
console.log(chalk_1.default.red('\nā No PR found for current branch\n'));
|
|
1045
|
+
return;
|
|
1046
|
+
}
|
|
1031
1047
|
}
|
|
1032
1048
|
const mergeMethod = intent.options?.method || 'MERGE';
|
|
1033
1049
|
console.log(chalk_1.default.blue(`\nš Enabling auto-merge for PR #${autoMergePrNum}...`));
|
|
@@ -1035,6 +1051,9 @@ async function executeGitHubCommand(intent) {
|
|
|
1035
1051
|
console.log(chalk_1.default.green(`ā Auto-merge enabled (will merge when CI passes)\n`));
|
|
1036
1052
|
break;
|
|
1037
1053
|
case 'pr_stack_show':
|
|
1054
|
+
case 'show_pr_stack':
|
|
1055
|
+
case 'show_stack':
|
|
1056
|
+
case 'stack_status':
|
|
1038
1057
|
console.log(chalk_1.default.blue('\nš Loading PR stack...\n'));
|
|
1039
1058
|
const stack = await github.getPRStack(intent.options?.base || 'main');
|
|
1040
1059
|
if (stack.length === 0) {
|
|
@@ -1138,6 +1157,8 @@ async function executeGitHubCommand(intent) {
|
|
|
1138
1157
|
}
|
|
1139
1158
|
break;
|
|
1140
1159
|
case 'merge_queue_status':
|
|
1160
|
+
case 'check_merge_queue':
|
|
1161
|
+
case 'queue_status':
|
|
1141
1162
|
// Show auto-merge status for current PR
|
|
1142
1163
|
let statusPrNum = intent.target || intent.options?.number;
|
|
1143
1164
|
if (!statusPrNum) {
|