@leitwerk-dev/jira 0.4.0 → 0.4.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leitwerk-dev/jira",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "type": "module",
5
5
  "leitwerk": {
6
6
  "extension": {
@@ -25,11 +25,12 @@
25
25
  "build": "tsup && tsc -p tsconfig.tsup.json --emitDeclarationOnly"
26
26
  },
27
27
  "dependencies": {
28
- "@leitwerk-dev/domain": "0.4.0",
29
- "@leitwerk-dev/process-sdk": "0.4.0",
30
- "@leitwerk-dev/test-support": "0.4.0",
31
- "@leitwerk-dev/watcher-utils": "0.4.0",
32
- "@leitwerk-dev/wiki": "0.4.0"
28
+ "@leitwerk-dev/domain": "0.4.1",
29
+ "@leitwerk-dev/process-sdk": "0.4.1",
30
+ "@leitwerk-dev/test-support": "0.4.1",
31
+ "@leitwerk-dev/watcher-utils": "0.4.1",
32
+ "@leitwerk-dev/wiki": "0.4.1",
33
+ "markdown-it": "^14.1.1"
33
34
  },
34
35
  "devDependencies": {
35
36
  "tsup": "^8.5.1",
package/src/testing.ts CHANGED
@@ -41,6 +41,11 @@ const workflowTransitions: JiraTransition[] = [
41
41
  name: "Verify change",
42
42
  to: { id: "5", name: "In Verification", statusCategory: { key: "indeterminate" } },
43
43
  },
44
+ {
45
+ id: "50",
46
+ name: "Prepare verification",
47
+ to: { id: "6", name: "Ready for Verification", statusCategory: { key: "indeterminate" } },
48
+ },
44
49
  ];
45
50
 
46
51
  /** @internal */
@@ -2,7 +2,7 @@ import { SafeOutcomePlanningError } from "@leitwerk-dev/process-sdk";
2
2
 
3
3
  /** @internal */
4
4
  export const jiraTicketWritingInstructions =
5
- "Write summary and description as a normal standalone Jira task for its assignee, using Markdown for the description. Explain the work and acceptance criteria in plain language; retain concrete file paths, prerequisites, and validation steps when needed. Keep evidence, inspected revisions, repository keys, and other tracking data in the separate evidence fields. Do not put raw commit hashes, internal IDs, split identities, solution-wiki references, or model citation tokens in the summary or description. Refer to repositories by their readable names and Jira issues by their issue keys. The publisher adds repository and source-issue links. When revising an existing ticket, preserve useful task details and human notes, and omit any previous generated tracking footer.";
5
+ "Use plain English following ASD-STE100. Use at most three headings and at most 120 words under each heading; code snippets do not count toward the word limit. Choose headings that fit the work and include only supported details. Link to internal data instead of copying it. Write summary and description as a normal standalone Jira task for its assignee, using Markdown for the description. Explain the work and acceptance criteria in plain language; retain concrete file paths, prerequisites, and validation steps when needed. Keep evidence, inspected revisions, repository keys, and other tracking data in the separate evidence fields. Do not put raw commit hashes, internal IDs, split identities, solution-wiki references, or model citation tokens in the summary or description. Refer to repositories by their readable names and Jira issues by their issue keys. The publisher adds repository and source-issue links. When revising an existing ticket, preserve useful task details and human notes, and omit any previous generated tracking footer.";
6
6
 
7
7
  // These are references produced by the tools and publisher, not task requirements.
8
8
  const internalReference =
@@ -101,13 +101,22 @@ export function registerJiraWorkflowTools(api: ServerExtensionAPI, integration:
101
101
  name: "jira_transition_source_issue",
102
102
  description: "Reconcile the Jira source ticket's work, review or verification status",
103
103
  parameters: projectParameters(
104
- { targetStatus: { type: "string", enum: ["In Progress", "In Review", "In Verification"] } },
104
+ {
105
+ targetStatus: {
106
+ type: "string",
107
+ enum: ["In Progress", "In Review", "Ready for Verification", "In Verification"],
108
+ },
109
+ },
105
110
  ["targetStatus"],
106
111
  ),
107
112
  async execute(ctx, args) {
108
113
  const { client, id } = resolveJiraSourceClient(ctx, integration);
109
114
  const targetStatus = stringArg(args, "targetStatus");
110
- if (!["In Progress", "In Review", "In Verification"].includes(targetStatus))
115
+ if (
116
+ !["In Progress", "In Review", "Ready for Verification", "In Verification"].includes(
117
+ targetStatus,
118
+ )
119
+ )
111
120
  throw new Error("Unsupported Jira workflow target status");
112
121
  const target = statusName(targetStatus);
113
122
  const reconcile = async (phase: string) => {
@@ -117,6 +126,7 @@ export function registerJiraWorkflowTools(api: ServerExtensionAPI, integration:
117
126
  current === target ||
118
127
  status.statusCategory.key === "done" ||
119
128
  current === "in verification" ||
129
+ (current === "ready for verification" && target !== "in verification") ||
120
130
  (target === "in progress" && current === "in review")
121
131
  ? { issueId: id, status: status.name ?? status.statusCategory.key }
122
132
  : null;