mintree 0.2.2 → 0.2.3
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.
|
@@ -98,11 +98,15 @@ function kebabize(title) {
|
|
|
98
98
|
* Default prompt seeded into the overlay's Prompt field when the user opens
|
|
99
99
|
* `w` for an issue. Single-line on purpose — `ink-text-input` is one-line,
|
|
100
100
|
* so multi-line templates render weirdly when the user tabs in to edit.
|
|
101
|
-
*
|
|
102
|
-
*
|
|
103
|
-
*
|
|
101
|
+
* Provider-aware: GitHub issues get the `#<n>` + `gh issue view` form;
|
|
102
|
+
* Plane work items (id like `DSGN-1`) get the bare id + the issue URL,
|
|
103
|
+
* since `gh` can't read Plane and `#` isn't Plane's notation.
|
|
104
104
|
*/
|
|
105
|
-
function defaultPromptForIssue(id, title) {
|
|
105
|
+
function defaultPromptForIssue(id, title, url) {
|
|
106
|
+
const isPlane = /^[A-Z][A-Z0-9_]*-\d+$/.test(id);
|
|
107
|
+
if (isPlane) {
|
|
108
|
+
return `Empezá a trabajar el ticket ${id} (${title}). Abrí ${url} para leer el contexto completo y seguí las convenciones del repo.`;
|
|
109
|
+
}
|
|
106
110
|
return `Empezá a trabajar el issue #${id} (${title}). Usá \`gh issue view ${id}\` para leer el contexto completo y seguí las convenciones del repo.`;
|
|
107
111
|
}
|
|
108
112
|
/**
|
|
@@ -879,7 +883,7 @@ export default function Dashboard() {
|
|
|
879
883
|
currentBranch: root ? getCurrentBranch(root) : null,
|
|
880
884
|
type: "feat",
|
|
881
885
|
desc: kebabize(issue.issue.title) || `issue-${issue.issue.id}`,
|
|
882
|
-
prompt: defaultPromptForIssue(issue.issue.id, issue.issue.title),
|
|
886
|
+
prompt: defaultPromptForIssue(issue.issue.id, issue.issue.title, issue.issue.url),
|
|
883
887
|
field: "branchMode",
|
|
884
888
|
error: null,
|
|
885
889
|
conventionDoc: root ? findBranchConventionDoc(root) : null,
|
|
@@ -362,7 +362,7 @@ function mapWorkItemToProviderIssue(project, workspaceSlug, wi) {
|
|
|
362
362
|
}
|
|
363
363
|
}
|
|
364
364
|
const state = normaliseState(wi.state);
|
|
365
|
-
const url = `https://app.plane.so/${workspaceSlug}/
|
|
365
|
+
const url = `https://app.plane.so/${workspaceSlug}/browse/${project.identifier}-${wi.sequence_id}/`;
|
|
366
366
|
return {
|
|
367
367
|
id: toIssueId(project, wi.sequence_id),
|
|
368
368
|
title: wi.name,
|
package/package.json
CHANGED