codiedev 0.7.0 → 0.7.1
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/reverseTicket.js +6 -2
- package/dist/mcp.js +10 -8
- package/package.json +1 -1
|
@@ -274,13 +274,17 @@ async function runBranchMode(opts) {
|
|
|
274
274
|
console.error("Reverse-ticket generation returned no result. The writer may have skipped due to missing context.");
|
|
275
275
|
process.exit(1);
|
|
276
276
|
}
|
|
277
|
+
const portalHost = (process.env.CODIEDEV_PORTAL_URL || "https://codiedev.com").replace(/\/$/, "");
|
|
278
|
+
const portalLink = res.portalUrl.startsWith("http")
|
|
279
|
+
? res.portalUrl
|
|
280
|
+
: `${portalHost}${res.portalUrl.startsWith("/") ? "" : "/"}${res.portalUrl}`;
|
|
277
281
|
const verb = res.action === "overwritten" ? "Updated" : "Created";
|
|
278
282
|
console.log(`✓ ${verb} reverse-ticket draft.`);
|
|
279
283
|
console.log(` artifact: ${res.artifactKey ?? res.artifactId}`);
|
|
280
|
-
console.log(` portal: ${
|
|
284
|
+
console.log(` portal: ${portalLink}`);
|
|
281
285
|
console.log("");
|
|
282
286
|
console.log("Open in your portal to review, edit, and push to Jira.");
|
|
283
|
-
console.log("
|
|
287
|
+
console.log("Each call creates a fresh draft — clean up duplicates from the portal if needed.");
|
|
284
288
|
}
|
|
285
289
|
catch (err) {
|
|
286
290
|
console.error(`Reverse-ticket failed: ${err.message}`);
|
package/dist/mcp.js
CHANGED
|
@@ -1150,11 +1150,13 @@ async function handleReverseTicket(args, config) {
|
|
|
1150
1150
|
],
|
|
1151
1151
|
};
|
|
1152
1152
|
}
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
const
|
|
1153
|
+
// Always return an absolute URL so MCP clients (Copilot Chat, Claude Code,
|
|
1154
|
+
// etc.) can render the link correctly without guessing a host. Default to
|
|
1155
|
+
// codiedev.com; allow override via CODIEDEV_PORTAL_URL for self-hosted.
|
|
1156
|
+
const portalHost = (process.env.CODIEDEV_PORTAL_URL || "https://codiedev.com").replace(/\/$/, "");
|
|
1157
|
+
const portalLink = res.portalUrl.startsWith("http")
|
|
1158
|
+
? res.portalUrl
|
|
1159
|
+
: `${portalHost}${res.portalUrl.startsWith("/") ? "" : "/"}${res.portalUrl}`;
|
|
1158
1160
|
const verb = res.action === "overwritten" ? "Updated" : "Created";
|
|
1159
1161
|
return {
|
|
1160
1162
|
content: [
|
|
@@ -1166,9 +1168,9 @@ async function handleReverseTicket(args, config) {
|
|
|
1166
1168
|
` diff size: ${diff.length} chars\n` +
|
|
1167
1169
|
` artifact: ${res.artifactKey ?? res.artifactId}\n\n` +
|
|
1168
1170
|
`Open in your portal to review, edit, and push to Jira:\n` +
|
|
1169
|
-
` ${
|
|
1170
|
-
`
|
|
1171
|
-
`
|
|
1171
|
+
` ${portalLink}\n\n` +
|
|
1172
|
+
`Each call creates a fresh draft — if you've made several for the ` +
|
|
1173
|
+
`same branch, clean them up from the portal.`,
|
|
1172
1174
|
},
|
|
1173
1175
|
],
|
|
1174
1176
|
};
|
package/package.json
CHANGED