automata-cli 0.10.0-develop.396 → 0.10.0-develop.403
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 +16 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -371,6 +371,17 @@ function getPrInfo() {
|
|
|
371
371
|
};
|
|
372
372
|
}
|
|
373
373
|
|
|
374
|
+
// src/remote/backend.ts
|
|
375
|
+
function selectBackend(config) {
|
|
376
|
+
return config.remoteType === "azdo" ? "azdo" : "gh";
|
|
377
|
+
}
|
|
378
|
+
function isAzdo(config) {
|
|
379
|
+
return selectBackend(config) === "azdo";
|
|
380
|
+
}
|
|
381
|
+
function isExplicitGitHub(config) {
|
|
382
|
+
return config.remoteType === "gh";
|
|
383
|
+
}
|
|
384
|
+
|
|
374
385
|
// src/run/commandTrace.ts
|
|
375
386
|
var sink = null;
|
|
376
387
|
function startCommandTrace() {
|
|
@@ -895,7 +906,7 @@ async function getPrInfoGh(branch) {
|
|
|
895
906
|
}
|
|
896
907
|
async function getPrInfo2(branch) {
|
|
897
908
|
const config = readConfig();
|
|
898
|
-
if (config
|
|
909
|
+
if (selectBackend(config) === "azdo") {
|
|
899
910
|
return getPrInfo();
|
|
900
911
|
}
|
|
901
912
|
return getPrInfoGh(branch);
|
|
@@ -1104,7 +1115,7 @@ function getPrCommentsGh(branch) {
|
|
|
1104
1115
|
}
|
|
1105
1116
|
function getPrComments(branch) {
|
|
1106
1117
|
const config = readConfig();
|
|
1107
|
-
if (config
|
|
1118
|
+
if (selectBackend(config) === "azdo") {
|
|
1108
1119
|
return "unsupported";
|
|
1109
1120
|
}
|
|
1110
1121
|
return getPrCommentsGh(branch);
|
|
@@ -2790,7 +2801,7 @@ Select issue (1-${issues.length}): `, resolve2)
|
|
|
2790
2801
|
return issues[n - 1];
|
|
2791
2802
|
}
|
|
2792
2803
|
function validateConfig(config) {
|
|
2793
|
-
if (config
|
|
2804
|
+
if (!isExplicitGitHub(config)) {
|
|
2794
2805
|
process.stderr.write(
|
|
2795
2806
|
"Error: implement-next is not supported in Azure DevOps mode. Work item discovery is not available in azdo-cli. See docs/azdo-gap.md for details.\n"
|
|
2796
2807
|
);
|
|
@@ -3264,7 +3275,7 @@ var executeCheckIssueCmd = addAiOptions(
|
|
|
3264
3275
|
process.exit(1);
|
|
3265
3276
|
}
|
|
3266
3277
|
const config = readConfig();
|
|
3267
|
-
if (config
|
|
3278
|
+
if (isAzdo(config)) {
|
|
3268
3279
|
process.stderr.write(
|
|
3269
3280
|
"Error: check-issue is not supported for Azure DevOps. See docs/azdo-gap.md for details.\n"
|
|
3270
3281
|
);
|
|
@@ -5760,7 +5771,7 @@ function resolveSettingsResult(options, verifyIdentity) {
|
|
|
5760
5771
|
}
|
|
5761
5772
|
}
|
|
5762
5773
|
function requireParticipants(config) {
|
|
5763
|
-
if (config
|
|
5774
|
+
if (!isExplicitGitHub(config)) {
|
|
5764
5775
|
failSettings(
|
|
5765
5776
|
"do-work is only supported for GitHub remotes. Set it with `automata config set type gh`. Azure DevOps lacks the issue conversation APIs this needs \u2014 see docs/azdo-gap.md."
|
|
5766
5777
|
);
|