@leitwerk-dev/github-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 CHANGED
@@ -1 +1,69 @@
1
- Registration placeholder only. Not a usable Leitwerk release.
1
+ # GitHub repository change
2
+
3
+ `@leitwerk-dev/github-repo-change` plans, implements, reviews, and publishes a
4
+ repository change as a GitHub pull request. Load `github`, `git-ssh`, `coding`,
5
+ and this extension on the server and worker. The extension is opt-in.
6
+
7
+ The UI launcher selects a server-owned GitHub profile, a visible repository, and
8
+ a requested change. Launch checks repository visibility and SSH read/write access,
9
+ pins the bot Git identity, and uses the default branch as the base. Replaying a UI
10
+ launch generates a new work branch. Plans and implementations require operator
11
+ approval before publication.
12
+
13
+ ## Configuration
14
+
15
+ Configure API access in [github](../github/README.md) and checkout credentials in
16
+ [git-ssh](../git-ssh/README.md). The SSH credential defaults to the GitHub profile
17
+ name. Override it for future launches:
18
+
19
+ ```yaml
20
+ extensions:
21
+ github-repo-change:
22
+ profile_bindings:
23
+ team:
24
+ ssh_credential_ref: repository-writer
25
+ process_configs:
26
+ github_repo_change_process:
27
+ watchers:
28
+ use_leitwerk:
29
+ enabled: true
30
+ profile: team
31
+ poll_interval: 30s
32
+ repositories:
33
+ include: [team/service]
34
+ labels:
35
+ trigger: use-leitwerk
36
+ done: leitwerk-done
37
+ ```
38
+
39
+ The issue watcher uses the integration's trigger-actor authorization and rechecks
40
+ it before launch. Issue launches use `leitwerk/issue-N`. Profile mappings cannot
41
+ be overridden through launcher input; existing instances retain resolved wiring.
42
+
43
+ ## Delivery and recovery
44
+
45
+ The shared coding publication lifecycle commits and pushes the work branch, then
46
+ creates or reconciles one PR. It settles human feedback for two minutes, acknowledges
47
+ it, and starts a fresh repair turn. Replies and other provider writes reconcile
48
+ across retries. GitHub checks trigger repair only for the tracked request revision;
49
+ diagnostics include failed check annotations and bounded Actions job logs. Consumed
50
+ failure evidence is retained so rearming cannot repeatedly repair the same failure.
51
+ After three automatic CI cycles, the operator chooses retry, resume waiting, or
52
+ abort. Missing or successful checks do not complete the process.
53
+
54
+ Confirmed conflicts and GitHub's clean-but-behind condition use the shared rebase
55
+ implementation and the original-head push lease. Merge completes delivery; closing
56
+ an unmerged PR aborts it. An issue-origin merge removes the trigger, adds the done
57
+ label, comments, and closes the issue. Unmerged closure removes the trigger and
58
+ comments without closing the issue. Source cancellation aborts waiting delivery;
59
+ terminal PR reconciliation takes precedence. UI-origin processes never need a
60
+ source issue.
61
+
62
+ ## Composition
63
+
64
+ The default extension requires Docker. Trusted local compositions can use
65
+ `createGitHubRepoChange({ docker: false })`; load exactly one variant. Both retain
66
+ `github_repo_change_process`. Custom GitHub integrations must supply `profiles()`
67
+ to expose profiles to the launcher. The factory owns its launcher configuration
68
+ and clears it when the server stops. Automatic merging, existing-PR adoption,
69
+ 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.
@@ -0,0 +1,56 @@
1
+ import type { LeitwerkExtensionModule } from "@leitwerk-dev/process-sdk";
2
+ /** @public */
3
+ export declare const manifest: {
4
+ /** @public */
5
+ readonly id: "github-repo-change";
6
+ /** @public */
7
+ readonly version: "0.1.9";
8
+ /** @public */
9
+ readonly requires: readonly ["github", "coding", "git-ssh"];
10
+ };
11
+ /** Load exactly one variant per catalog. Only trusted composition code selects Docker. */
12
+ /** @public */
13
+ /** @public */
14
+ export declare function createGitHubRepoChange(options: {
15
+ /** @public */
16
+ docker: boolean;
17
+ }): {
18
+ /** @public */
19
+ extension: LeitwerkExtensionModule;
20
+ /** @public */
21
+ process: import("@leitwerk-dev/process-sdk").ExtensionProcessDefinition<import("./params.js").GitHubRepoChangeParams, import("@leitwerk-dev/coding/repository-change-state").RepositoryChangeState>;
22
+ /** @public */
23
+ launcher: {
24
+ /** @public */
25
+ configure: (value: import("./launcher.js").LauncherDependencies | null) => void;
26
+ /** @public */
27
+ preparationChecks: (_input: unknown, { params }: import("@leitwerk-dev/process-sdk").ProcessLaunchConfig<import("./params.js").GitHubRepoChangeParams>) => readonly import("@leitwerk-dev/process-sdk").LaunchPreparationCheck<import("./params.js").GitHubRepoChangeParams>[];
28
+ /** @public */
29
+ resolveProfiles: (profile: string) => import("./profile-bindings.js").ProfileBinding;
30
+ /** @public */
31
+ resolveGitIdentity: (profile: string) => Promise<import("@leitwerk-dev/github").GitHubGitIdentity>;
32
+ /** @public */
33
+ launcher: import("@leitwerk-dev/process-sdk").ProcessLauncherDefinition<import("./params.js").GitHubRepoChangeParams>;
34
+ };
35
+ };
36
+ export * from "./launcher.js";
37
+ export * from "./params.js";
38
+ export * from "./process.js";
39
+ export * from "./profile-bindings.js";
40
+ /** @public */
41
+ export declare const defaultExtension: LeitwerkExtensionModule, githubRepoChangeProcess: import("@leitwerk-dev/process-sdk").ExtensionProcessDefinition<import("./params.js").GitHubRepoChangeParams, import("@leitwerk-dev/coding/repository-change-state").RepositoryChangeState>, defaultGitHubRepoChangeLauncher: {
42
+ /** @public */
43
+ configure: (value: import("./launcher.js").LauncherDependencies | null) => void;
44
+ /** @public */
45
+ preparationChecks: (_input: unknown, { params }: import("@leitwerk-dev/process-sdk").ProcessLaunchConfig<import("./params.js").GitHubRepoChangeParams>) => readonly import("@leitwerk-dev/process-sdk").LaunchPreparationCheck<import("./params.js").GitHubRepoChangeParams>[];
46
+ /** @public */
47
+ resolveProfiles: (profile: string) => import("./profile-bindings.js").ProfileBinding;
48
+ /** @public */
49
+ resolveGitIdentity: (profile: string) => Promise<import("@leitwerk-dev/github").GitHubGitIdentity>;
50
+ /** @public */
51
+ launcher: import("@leitwerk-dev/process-sdk").ProcessLauncherDefinition<import("./params.js").GitHubRepoChangeParams>;
52
+ };
53
+ /** @public */
54
+ export declare const configureGitHubRepoChangeLauncher: (value: import("./launcher.js").LauncherDependencies | null) => void, githubRepositoryPreparationChecks: (_input: unknown, { params }: import("@leitwerk-dev/process-sdk").ProcessLaunchConfig<import("./params.js").GitHubRepoChangeParams>) => readonly import("@leitwerk-dev/process-sdk").LaunchPreparationCheck<import("./params.js").GitHubRepoChangeParams>[], resolveGitHubGitIdentity: (profile: string) => Promise<import("@leitwerk-dev/github").GitHubGitIdentity>, githubRepoChangeUiLauncher: import("@leitwerk-dev/process-sdk").ProcessLauncherDefinition<import("./params.js").GitHubRepoChangeParams>;
55
+ export default defaultExtension;
56
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAKzE,cAAc;AACd,eAAO,MAAM,QAAQ;IACpB,cAAc;;IAEd,cAAc;;IAEd,cAAc;;CAEL,CAAC;AAEX,0FAA0F;AAC1F,cAAc;AACd,cAAc;AACd,wBAAgB,sBAAsB,CAAC,OAAO,EAAE;IAC/C,cAAc;IACd,MAAM,EAAE,OAAO,CAAC;CAChB;IAyBC,cAAc;;IAEd,cAAc;;IAEd,cAAc;;;;;;;;;;;;;EAGf;AAED,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,uBAAuB,CAAC;AACtC,cAAc;AACd,eAAO,MACK,gBAAgB,2BAClB,uBAAuB,8LACtB,+BAA+B;;;;;;;;;;;CACE,CAAC;AAC7C,cAAc;AACd,eAAO,MACK,iCAAiC,wEACzB,iCAAiC,+PAChC,wBAAwB,kFAClC,0BAA0B,6GACF,CAAC;AACpC,eAAe,gBAAgB,CAAC"}