automata-cli 0.10.0-develop.408 → 0.10.0-develop.418
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 +15 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -372,12 +372,17 @@ function getPrInfo() {
|
|
|
372
372
|
}
|
|
373
373
|
|
|
374
374
|
// src/remote/backend.ts
|
|
375
|
+
var AZDO_GAP_DOC = "docs/azdo-gap.md";
|
|
375
376
|
function selectBackend(config) {
|
|
376
377
|
return config.remoteType === "azdo" ? "azdo" : "gh";
|
|
377
378
|
}
|
|
378
379
|
function isAzdo(config) {
|
|
379
380
|
return selectBackend(config) === "azdo";
|
|
380
381
|
}
|
|
382
|
+
function azdoUnsupportedMessage(feature, detail) {
|
|
383
|
+
const extra = detail ? ` ${detail}` : "";
|
|
384
|
+
return `${feature} is not supported for Azure DevOps.${extra} See ${AZDO_GAP_DOC} for details.`;
|
|
385
|
+
}
|
|
381
386
|
function isExplicitGitHub(config) {
|
|
382
387
|
return config.remoteType === "gh";
|
|
383
388
|
}
|
|
@@ -1603,7 +1608,7 @@ See docs/azdo-gap.md for details.`
|
|
|
1603
1608
|
}
|
|
1604
1609
|
if (comments === "unsupported") {
|
|
1605
1610
|
process.stderr.write(
|
|
1606
|
-
`Error: get-pr-comments
|
|
1611
|
+
`Error: ${azdoUnsupportedMessage("get-pr-comments")}
|
|
1607
1612
|
`
|
|
1608
1613
|
);
|
|
1609
1614
|
process.exit(1);
|
|
@@ -2803,7 +2808,8 @@ Select issue (1-${issues.length}): `, resolve2)
|
|
|
2803
2808
|
function validateConfig(config) {
|
|
2804
2809
|
if (!isExplicitGitHub(config)) {
|
|
2805
2810
|
process.stderr.write(
|
|
2806
|
-
|
|
2811
|
+
`Error: ${azdoUnsupportedMessage("implement-next", "Work item discovery is not available in azdo-cli.")}
|
|
2812
|
+
`
|
|
2807
2813
|
);
|
|
2808
2814
|
process.exit(1);
|
|
2809
2815
|
}
|
|
@@ -3233,7 +3239,7 @@ var executeFixCommentsCmd = addAiOptions(
|
|
|
3233
3239
|
}
|
|
3234
3240
|
if (result.kind === "unsupported") {
|
|
3235
3241
|
process.stderr.write(
|
|
3236
|
-
`Error: fix-comments
|
|
3242
|
+
`Error: ${azdoUnsupportedMessage("fix-comments")}
|
|
3237
3243
|
`
|
|
3238
3244
|
);
|
|
3239
3245
|
process.exit(1);
|
|
@@ -3277,7 +3283,8 @@ var executeCheckIssueCmd = addAiOptions(
|
|
|
3277
3283
|
const config = readConfig();
|
|
3278
3284
|
if (isAzdo(config)) {
|
|
3279
3285
|
process.stderr.write(
|
|
3280
|
-
|
|
3286
|
+
`Error: ${azdoUnsupportedMessage("check-issue")}
|
|
3287
|
+
`
|
|
3281
3288
|
);
|
|
3282
3289
|
process.exit(1);
|
|
3283
3290
|
}
|
|
@@ -5798,7 +5805,10 @@ function resolveSettingsResult(options, verifyIdentity) {
|
|
|
5798
5805
|
function requireParticipants(config) {
|
|
5799
5806
|
if (!isExplicitGitHub(config)) {
|
|
5800
5807
|
failSettings(
|
|
5801
|
-
|
|
5808
|
+
azdoUnsupportedMessage(
|
|
5809
|
+
"do-work",
|
|
5810
|
+
"It needs the GitHub issue conversation APIs; set the remote with `automata config set type gh`."
|
|
5811
|
+
)
|
|
5802
5812
|
);
|
|
5803
5813
|
}
|
|
5804
5814
|
if (!config.issueDiscoveryTechnique) {
|