@leitwerk-dev/jira-issue-split 0.0.0-stage → 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/README.md +124 -2
- package/dist/LICENSE +13 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1128 -0
- package/dist/index.js.map +1 -0
- package/dist/model.d.ts +74 -0
- package/dist/model.d.ts.map +1 -0
- package/dist/process.d.ts +8 -0
- package/dist/process.d.ts.map +1 -0
- package/dist/services.d.ts +41 -0
- package/dist/services.d.ts.map +1 -0
- package/dist/test-fixture.d.ts +12 -0
- package/dist/test-fixture.d.ts.map +1 -0
- package/package.json +57 -5
- package/src/index.ts +256 -0
- package/src/model.ts +236 -0
- package/src/process.ts +521 -0
- package/src/services.ts +577 -0
- package/src/test-fixture.ts +30 -0
package/README.md
CHANGED
|
@@ -1,3 +1,125 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Jira issue splitting
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
`@leitwerk-dev/jira-issue-split` creates one reviewed child ticket per applicable
|
|
4
|
+
GitLab repository. Epics create Stories or Tasks; other issue types create native
|
|
5
|
+
Jira subtasks. Existing subtasks cannot be split because Jira does not support
|
|
6
|
+
nested subtasks. It does not change repository code. Load `jira`, `gitlab`,
|
|
7
|
+
`git-ssh`, `coding`, `jira-gitlab-change`, and this opt-in extension.
|
|
8
|
+
|
|
9
|
+
Start **Jira Issue Split** in the UI with an open issue, explicit GitLab group or
|
|
10
|
+
project paths, exclusions, and Jira/GitLab/SSH profiles. Groups include subgroups;
|
|
11
|
+
exclusions take precedence. Archived repositories are excluded during discovery.
|
|
12
|
+
Scopes over 500 repositories must be narrowed. API tokens stay on the server.
|
|
13
|
+
SSH credentials authorize full clones only when `checkout_repository` is called.
|
|
14
|
+
Inspection prompts forbid changes, but shell access is not a read-only sandbox.
|
|
15
|
+
|
|
16
|
+
The Jira token needs issue creation, component and create-metadata reads, and label
|
|
17
|
+
updates. Epic splits require the Epic Link field; configure it when schema discovery
|
|
18
|
+
is ambiguous. Subtask splits do not require Epic Link. The sole available subtask
|
|
19
|
+
type is selected automatically; when several are available, supply its Jira type ID
|
|
20
|
+
in `subtaskIssueType`. See the [Jira integration](../jira/README.md).
|
|
21
|
+
Creation uses Data Center REST v2, not Jira Cloud.
|
|
22
|
+
|
|
23
|
+
## Workflow
|
|
24
|
+
|
|
25
|
+
| Turn | Work |
|
|
26
|
+
| --- | --- |
|
|
27
|
+
| `read_epic` | Capture the requirement and its revision. |
|
|
28
|
+
| `discover_candidates` | Decide for every scoped repository; retain exclusion reasons. |
|
|
29
|
+
| `assess_repository` | Sequential mapped LLM assessment, with GitLab reads and optional checkout. |
|
|
30
|
+
| `prepare_review` | Resolve component mappings, check current repository heads, publish a review batch. |
|
|
31
|
+
| `batch_review` | Approve, exclude repositories, override Task types for epic children or labels, revise, or refresh mappings. |
|
|
32
|
+
| `revise_drafts` | Reinspect and revise unpublished drafts from operator feedback. |
|
|
33
|
+
| `publish_tickets` | Create approved tickets with receipts and exact repository bindings. |
|
|
34
|
+
| `complete_split` | Publish the final dispositions and ticket links. |
|
|
35
|
+
|
|
36
|
+
Assessments distinguish applicable, already compliant, not applicable, and unresolved.
|
|
37
|
+
Applicable drafts include evidence, an inspected commit, and concrete acceptance
|
|
38
|
+
criteria. Missing access is unresolved, not proof that a repository is irrelevant.
|
|
39
|
+
The batch is a standard published Markdown product and operator form, not a custom UI.
|
|
40
|
+
|
|
41
|
+
Generated Jira descriptions contain the reviewed task and acceptance criteria, plus
|
|
42
|
+
readable links to the repository and source issue. Evidence, inspected commits,
|
|
43
|
+
solution-wiki references, and split identities stay in Leitwerk's review batch and
|
|
44
|
+
durable publication records. The reconciliation marker remains a Jira label.
|
|
45
|
+
Drafts containing internal IDs, raw hashes, or model citation tokens must be revised
|
|
46
|
+
before approval or publication. Previously saved drafts remain readable. Published
|
|
47
|
+
tickets are not rewritten by this change.
|
|
48
|
+
|
|
49
|
+
In **Settings → Jira components**, map repositories to their GitLab and SSH profiles.
|
|
50
|
+
Created tickets receive every matching component in the source issue's Jira project. An
|
|
51
|
+
unmapped or unresolved row stays pending; other approved rows can publish. Refresh
|
|
52
|
+
after adding mappings. Requirement or repository-head changes need reassessment.
|
|
53
|
+
Profile/clone/default-branch identity changes, changing the source issue type, or moving it to another Jira project
|
|
54
|
+
require a new split. Published tickets
|
|
55
|
+
are retained, never silently edited. Finish without remaining tickets explicitly
|
|
56
|
+
excludes pending rows.
|
|
57
|
+
|
|
58
|
+
Labels start empty unless supplied by the operator or watcher configuration.
|
|
59
|
+
`use-leitwerk` is added only when explicitly selected at review or launch. It is
|
|
60
|
+
applied after the durable receipt is saved, making the existing Jira change watcher
|
|
61
|
+
eligible to launch work. No process directly spawns another process. The generated
|
|
62
|
+
ticket retains its exact repository even when a component maps to several repositories.
|
|
63
|
+
|
|
64
|
+
## Watcher
|
|
65
|
+
|
|
66
|
+
The dedicated label is `leitwerk-issue-split`. The legacy `leitwerk-epic-split`
|
|
67
|
+
label remains an alias; both labels share the same deduplication identity.
|
|
68
|
+
Neither label is allowed on generated children.
|
|
69
|
+
|
|
70
|
+
```yaml
|
|
71
|
+
process_configs:
|
|
72
|
+
jira_epic_split_process:
|
|
73
|
+
watchers:
|
|
74
|
+
epic_split:
|
|
75
|
+
enabled: true
|
|
76
|
+
jiraProfile: team
|
|
77
|
+
jiraProjects: ['10000']
|
|
78
|
+
gitlabProfile: team
|
|
79
|
+
sshProfile: team
|
|
80
|
+
groups: platform
|
|
81
|
+
projects: ''
|
|
82
|
+
excludeGroups: platform/archived
|
|
83
|
+
excludeProjects: platform/legacy
|
|
84
|
+
issueType: Story
|
|
85
|
+
subtaskIssueType: '' # Auto-select the sole subtask type; otherwise supply its Jira type ID.
|
|
86
|
+
labels: ''
|
|
87
|
+
pollInterval: 30s
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
Group/project fields accept comma- or whitespace-separated exact paths. The watcher
|
|
91
|
+
deduplicates by Jira installation and source issue ID and leaves the source label unchanged.
|
|
92
|
+
It always pauses at batch review before creating tickets.
|
|
93
|
+
`issueType` selects Story or Task for epic children only. `subtaskIssueType` applies
|
|
94
|
+
to other source issues. The package and extension are named `jira-issue-split`.
|
|
95
|
+
Process, launcher, watcher, watcher-source and turn IDs, and event deduplication keys
|
|
96
|
+
retain their existing names so configurations and persisted runs remain compatible.
|
|
97
|
+
Legacy `epic` launch input remains accepted as an alias for `issue`.
|
|
98
|
+
|
|
99
|
+
## Recovery and shared solutions
|
|
100
|
+
|
|
101
|
+
Each Jira POST includes a stable `leitwerk-split-<digest>` marker. A durable reservation
|
|
102
|
+
precedes the POST; an uncertain result cannot issue another POST while Jira search
|
|
103
|
+
lags. Generic retry reconciles the marked issue or retained receipt. Known rejected
|
|
104
|
+
requests can retry after configuration is corrected. If the outcome stays uncertain,
|
|
105
|
+
an operator must locate the marked issue; if none exists, manually create the intended
|
|
106
|
+
ticket with that marker and the required Epic Link or subtask parent, then retry. Never remove a reservation merely
|
|
107
|
+
because search currently returns no result. Missing required Jira fields need project
|
|
108
|
+
defaults; this process does not guess custom-field values.
|
|
109
|
+
|
|
110
|
+
Component mappings, source issue revision and type, child type, and repository evidence are checked again before
|
|
111
|
+
new writes. Receipts reconcile independently of subsequent requirement or repository
|
|
112
|
+
changes; an unperformed change trigger still requires current approval. Duplicate marker
|
|
113
|
+
matches or changed ticket bindings require reconciliation.
|
|
114
|
+
Successful trigger receipts persist independently of process cleanup and prevent
|
|
115
|
+
reapplying a consumed `use-leitwerk` label.
|
|
116
|
+
|
|
117
|
+
The splitter and newly launched Jira changes for its children share a
|
|
118
|
+
[topic solution wiki](../../docs/topic-wiki.md) scoped to the source issue, including
|
|
119
|
+
manually created children. Splitting a story uses that story's wiki even if it belongs
|
|
120
|
+
to an epic. Separate stories in the same epic do not share their subtask wikis.
|
|
121
|
+
Processes keep independent execution trees. The wiki shares reusable solutions
|
|
122
|
+
with applicability and revisioned evidence. Contributions must help another process
|
|
123
|
+
and add knowledge absent from the current ticket description and shared source
|
|
124
|
+
requirement. Repeating requirements or reporting progress does not qualify.
|
|
125
|
+
See the [wiki interface](../../packages/wiki/README.md) for contribution and revision rules.
|
package/dist/LICENSE
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
Copyright 2026 Leitwerk contributors.
|
|
2
|
+
|
|
3
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
you may not use this file except in compliance with the License.
|
|
5
|
+
You may obtain a copy of the License at
|
|
6
|
+
|
|
7
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
|
|
9
|
+
Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
See the License for the specific language governing permissions and
|
|
13
|
+
limitations under the License.
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type LeitwerkExtensionModule } from "@leitwerk-dev/process-sdk";
|
|
2
|
+
import type { SplitParams } from "./model.js";
|
|
3
|
+
/** @internal */
|
|
4
|
+
export declare const issueSplitSource: import("@leitwerk-dev/process-sdk").ProcessWatcherSource<Record<string, unknown>, Record<string, unknown>>;
|
|
5
|
+
/** @internal */
|
|
6
|
+
export declare const jiraIssueSplitProcess: import("@leitwerk-dev/process-sdk").ExtensionProcessDefinition<SplitParams, import("./model.js").SplitState>;
|
|
7
|
+
/** @internal */
|
|
8
|
+
declare const extension: LeitwerkExtensionModule;
|
|
9
|
+
export default extension;
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAUA,OAAO,EAGN,KAAK,uBAAuB,EAI5B,MAAM,2BAA2B,CAAC;AAGnC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAe9C,gBAAgB;AAChB,eAAO,MAAM,gBAAgB,4GA4B3B,CAAC;AAsGH,gBAAgB;AAChB,eAAO,MAAM,qBAAqB,8GAehC,CAAC;AAEH,gBAAgB;AAChB,QAAA,MAAM,SAAS,EAAE,uBAqEhB,CAAC;AACF,eAAe,SAAS,CAAC"}
|