spets 0.1.69 → 0.1.70
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/assets/github/workflows/spets.yml +2 -1
- package/dist/index.js +25 -0
- package/package.json +1 -1
|
@@ -90,7 +90,8 @@ jobs:
|
|
|
90
90
|
contains(github.event.comment.body, '/approve') ||
|
|
91
91
|
contains(github.event.comment.body, '/revise') ||
|
|
92
92
|
contains(github.event.comment.body, '/reject') ||
|
|
93
|
-
contains(github.event.comment.body, '/answer')
|
|
93
|
+
contains(github.event.comment.body, '/answer') ||
|
|
94
|
+
contains(github.event.comment.body, '/decide')
|
|
94
95
|
)
|
|
95
96
|
runs-on: ubuntu-latest
|
|
96
97
|
|
package/dist/index.js
CHANGED
|
@@ -3769,6 +3769,19 @@ function parseGitHubCommand(comment) {
|
|
|
3769
3769
|
}
|
|
3770
3770
|
return { command: "answer", answers };
|
|
3771
3771
|
}
|
|
3772
|
+
const decideMatch = trimmed.match(/^\/decide\s*\n([\s\S]+)$/m);
|
|
3773
|
+
if (decideMatch) {
|
|
3774
|
+
const decisionsText = decideMatch[1];
|
|
3775
|
+
const decisions = {};
|
|
3776
|
+
const decisionLines = decisionsText.split("\n");
|
|
3777
|
+
for (const line of decisionLines) {
|
|
3778
|
+
const match = line.match(/^(D\d+):\s*([^#]+)/i);
|
|
3779
|
+
if (match) {
|
|
3780
|
+
decisions[match[1].toLowerCase()] = match[2].trim();
|
|
3781
|
+
}
|
|
3782
|
+
}
|
|
3783
|
+
return { command: "decide", decisions };
|
|
3784
|
+
}
|
|
3772
3785
|
return { command: null };
|
|
3773
3786
|
}
|
|
3774
3787
|
function getGitHubInfo2(cwd) {
|
|
@@ -3906,6 +3919,18 @@ async function githubCommand(options) {
|
|
|
3906
3919
|
response = orchestrator.cmdClarified(taskId, answers);
|
|
3907
3920
|
break;
|
|
3908
3921
|
}
|
|
3922
|
+
case "decide": {
|
|
3923
|
+
console.log("Processing decisions");
|
|
3924
|
+
const decisionAnswers = Object.entries(parsed.decisions || {}).sort(([a], [b]) => a.localeCompare(b)).map(([id, value]) => ({
|
|
3925
|
+
decisionId: id,
|
|
3926
|
+
selectedOptionId: value,
|
|
3927
|
+
// Will be matched against option IDs, or used as custom input
|
|
3928
|
+
customInput: value
|
|
3929
|
+
// Also provide as custom input in case it doesn't match an option
|
|
3930
|
+
}));
|
|
3931
|
+
response = orchestrator.cmdClarified(taskId, decisionAnswers);
|
|
3932
|
+
break;
|
|
3933
|
+
}
|
|
3909
3934
|
}
|
|
3910
3935
|
const stepExecutor = new StepExecutor(adapter, config, cwd);
|
|
3911
3936
|
while (response.type !== "complete" && response.type !== "error") {
|