@leitwerk-dev/gitlab-repo-change 0.0.0-bootstrap.0 → 0.3.0
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 +73 -1
- package/dist/LICENSE +13 -0
- package/dist/index.d.ts +48 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +934 -0
- package/dist/index.js.map +1 -0
- package/dist/launcher.d.ts +15 -0
- package/dist/launcher.d.ts.map +1 -0
- package/dist/params.d.ts +39 -0
- package/dist/params.d.ts.map +1 -0
- package/dist/process.d.ts +10 -0
- package/dist/process.d.ts.map +1 -0
- package/package.json +50 -14
- package/src/index.ts +55 -0
- package/src/launcher.ts +240 -0
- package/src/params.ts +93 -0
- package/src/process.ts +249 -0
package/README.md
CHANGED
|
@@ -1 +1,73 @@
|
|
|
1
|
-
|
|
1
|
+
# GitLab repository change
|
|
2
|
+
|
|
3
|
+
`@leitwerk-dev/gitlab-repo-change` plans, implements, reviews, and publishes a
|
|
4
|
+
repository change as a new GitLab merge request. Load `gitlab`, `coding`, and this
|
|
5
|
+
extension on the server and worker. The extension is opt-in.
|
|
6
|
+
|
|
7
|
+
The UI launcher selects a GitLab profile, a visible project, and a requested change.
|
|
8
|
+
It checks project visibility and HTTPS Git read/write admission, pins the bot Git
|
|
9
|
+
identity, and targets the default branch. Replaying a UI launch generates a new
|
|
10
|
+
work branch. Planning and implementation require operator approval.
|
|
11
|
+
|
|
12
|
+
## Configuration
|
|
13
|
+
|
|
14
|
+
Use the same [GitLab profile](../gitlab/README.md) for API and HTTPS repository
|
|
15
|
+
access. No separate Git SSH profile is required. Configure issue discovery on the
|
|
16
|
+
process:
|
|
17
|
+
|
|
18
|
+
```yaml
|
|
19
|
+
process_configs:
|
|
20
|
+
gitlab_repo_change_process:
|
|
21
|
+
watchers:
|
|
22
|
+
use_leitwerk:
|
|
23
|
+
enabled: true
|
|
24
|
+
profile: team
|
|
25
|
+
poll_interval: 30s
|
|
26
|
+
projects:
|
|
27
|
+
include: [team/service]
|
|
28
|
+
exclude: []
|
|
29
|
+
groups:
|
|
30
|
+
include: [team/libraries]
|
|
31
|
+
exclude: []
|
|
32
|
+
labels:
|
|
33
|
+
trigger: use-leitwerk
|
|
34
|
+
done: leitwerk-done
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Project and group includes form a union; groups include subgroups, exclusions win,
|
|
38
|
+
and project IDs remove duplicates. An explicit include or `all_accessible: true`
|
|
39
|
+
is required. Trigger and done labels must differ and contain no comma. The watcher
|
|
40
|
+
rechecks that the source issue remains open and eligible before creating a process.
|
|
41
|
+
Issue launches use `leitwerk/issue-N`; their durable identity includes the GitLab
|
|
42
|
+
origin, project ID, and issue IID.
|
|
43
|
+
|
|
44
|
+
## Delivery and recovery
|
|
45
|
+
|
|
46
|
+
The shared coding lifecycle commits and pushes, creates or reconciles one MR, and
|
|
47
|
+
waits for feedback, native CI, conflicts, or a terminal outcome. Repository metadata
|
|
48
|
+
starts with `{ profile, projectId }`; the server pins the MR `iid` after creation.
|
|
49
|
+
A lost creation response or a restart before binding recovers the same request.
|
|
50
|
+
Existing MR-bound integration tools still require the pinned IID.
|
|
51
|
+
|
|
52
|
+
Human discussion feedback settles for two minutes. Delivery acknowledges it with
|
|
53
|
+
an eyes reaction, revises in a fresh turn, and reconciles discussion replies. CI
|
|
54
|
+
repair reads failed jobs and bounded traces for the current MR pipeline. Synthetic
|
|
55
|
+
merge pipelines must contain the tracked source revision; newer pending pipelines
|
|
56
|
+
supersede older terminal results. After three automatic CI cycles the operator
|
|
57
|
+
chooses retry, resume waiting, or abort. Successful or absent CI continues waiting.
|
|
58
|
+
Confirmed merge conflicts use the shared rebase implementation and original-head
|
|
59
|
+
push lease. Unknown mergeability does not trigger a repair.
|
|
60
|
+
|
|
61
|
+
Merge completes delivery. Unmerged closure aborts it. A source issue loses its
|
|
62
|
+
trigger, gains the done label, receives a comment, and closes after merge. Unmerged
|
|
63
|
+
closure removes the trigger and comments while leaving the issue open. Source
|
|
64
|
+
cancellation aborts waiting delivery, with terminal MR reconciliation taking
|
|
65
|
+
precedence. UI-origin processes never require a source issue.
|
|
66
|
+
|
|
67
|
+
## Composition
|
|
68
|
+
|
|
69
|
+
The default extension requires Docker. Trusted local compositions can use
|
|
70
|
+
`createGitLabRepoChange({ docker: false })`; load exactly one variant. Both retain
|
|
71
|
+
`gitlab_repo_change_process`. Credentials remain in the owning integration except
|
|
72
|
+
for the existing repository-scoped worker Git credential delivery. Automatic
|
|
73
|
+
merging, existing-MR adoption, fork publication, and release delivery are not provided.
|
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,48 @@
|
|
|
1
|
+
import type { LeitwerkExtensionModule } from "@leitwerk-dev/process-sdk";
|
|
2
|
+
/** @public */
|
|
3
|
+
export declare const manifest: {
|
|
4
|
+
/** @public */
|
|
5
|
+
readonly id: "gitlab-repo-change";
|
|
6
|
+
/** @public */
|
|
7
|
+
readonly version: "0.1.9";
|
|
8
|
+
/** @public */
|
|
9
|
+
readonly requires: readonly ["gitlab", "coding"];
|
|
10
|
+
};
|
|
11
|
+
/** @public */
|
|
12
|
+
/** @public */
|
|
13
|
+
export declare function createGitLabRepoChange(options: {
|
|
14
|
+
/** @public */
|
|
15
|
+
docker: boolean;
|
|
16
|
+
}): {
|
|
17
|
+
/** @public */
|
|
18
|
+
extension: LeitwerkExtensionModule;
|
|
19
|
+
/** @public */
|
|
20
|
+
process: import("@leitwerk-dev/process-sdk").ExtensionProcessDefinition<import("./params.js").GitLabRepoChangeParams, import("@leitwerk-dev/coding/repository-change-state").RepositoryChangeState>;
|
|
21
|
+
/** @public */
|
|
22
|
+
launcher: {
|
|
23
|
+
/** @public */
|
|
24
|
+
configure: (value: import("@leitwerk-dev/gitlab").GitLabIntegration | null) => void;
|
|
25
|
+
/** @public */
|
|
26
|
+
launcher: import("@leitwerk-dev/process-sdk").ProcessLauncherDefinition<import("./params.js").GitLabRepoChangeParams>;
|
|
27
|
+
/** @public */
|
|
28
|
+
preparationChecks: (_input: unknown, { params }: import("@leitwerk-dev/process-sdk").ProcessLaunchConfig<import("./params.js").GitLabRepoChangeParams>) => readonly import("@leitwerk-dev/process-sdk").LaunchPreparationCheck<import("./params.js").GitLabRepoChangeParams>[];
|
|
29
|
+
/** @public */
|
|
30
|
+
fromIssue(event: import("@leitwerk-dev/gitlab").GitLabIssueWatcherEvent): Promise<import("@leitwerk-dev/process-sdk").ProcessLaunchConfig<import("./params.js").GitLabRepoChangeParams>>;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
/** @public */
|
|
34
|
+
export declare const defaultExtension: LeitwerkExtensionModule, gitlabRepoChangeProcess: import("@leitwerk-dev/process-sdk").ExtensionProcessDefinition<import("./params.js").GitLabRepoChangeParams, import("@leitwerk-dev/coding/repository-change-state").RepositoryChangeState>, defaultGitLabRepoChangeLauncher: {
|
|
35
|
+
/** @public */
|
|
36
|
+
configure: (value: import("@leitwerk-dev/gitlab").GitLabIntegration | null) => void;
|
|
37
|
+
/** @public */
|
|
38
|
+
launcher: import("@leitwerk-dev/process-sdk").ProcessLauncherDefinition<import("./params.js").GitLabRepoChangeParams>;
|
|
39
|
+
/** @public */
|
|
40
|
+
preparationChecks: (_input: unknown, { params }: import("@leitwerk-dev/process-sdk").ProcessLaunchConfig<import("./params.js").GitLabRepoChangeParams>) => readonly import("@leitwerk-dev/process-sdk").LaunchPreparationCheck<import("./params.js").GitLabRepoChangeParams>[];
|
|
41
|
+
/** @public */
|
|
42
|
+
fromIssue(event: import("@leitwerk-dev/gitlab").GitLabIssueWatcherEvent): Promise<import("@leitwerk-dev/process-sdk").ProcessLaunchConfig<import("./params.js").GitLabRepoChangeParams>>;
|
|
43
|
+
};
|
|
44
|
+
export * from "./launcher.js";
|
|
45
|
+
export * from "./params.js";
|
|
46
|
+
export * from "./process.js";
|
|
47
|
+
export default defaultExtension;
|
|
48
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAGzE,cAAc;AACd,eAAO,MAAM,QAAQ;IACpB,cAAc;;IAEd,cAAc;;IAEd,cAAc;;CAEL,CAAC;AACX,cAAc;AACd,cAAc;AACd,wBAAgB,sBAAsB,CAAC,OAAO,EAAE;IAC/C,cAAc;IACd,MAAM,EAAE,OAAO,CAAC;CAChB;IAmBC,cAAc;;IAEd,cAAc;;IAEd,cAAc;;;;;;;;;;;EAGf;AACD,cAAc;AACd,eAAO,MACK,gBAAgB,2BAClB,uBAAuB,8LACtB,+BAA+B;;;;;;;;;CACE,CAAC;AAC7C,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,eAAe,gBAAgB,CAAC"}
|