@rmartz/pr-lifecycle 5.0.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Reed Martz
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,56 @@
1
+ # @rmartz/pr-lifecycle
2
+
3
+ An **event-driven pull-request lifecycle reconciler** for GitHub Actions. On every
4
+ relevant GitHub event it recomputes a PR's lifecycle state from the PR's current
5
+ facts — draft status, Copilot review of the head, the latest verdict from a
6
+ trusted author and the head SHA it reviewed — converges the PR's labels to match,
7
+ and **arms GitHub-native auto-merge when the PR reaches `approved`**. The
8
+ consumer's branch ruleset (required checks) then decides when the merge lands.
9
+
10
+ It joins the same family as
11
+ [`@rmartz/merge-safety`](https://github.com/rmartz/merge-safety),
12
+ [`@rmartz/repo-hygiene`](https://github.com/rmartz/repo-hygiene), and
13
+ [`@rmartz/bot-automerge`](https://github.com/rmartz/bot-automerge): a small
14
+ TypeScript package distributed as a version-pinned action that Dependabot keeps
15
+ current in consuming repos.
16
+
17
+ > **Status: scaffold.** The toolchain, CI gates, and release pipeline are in place;
18
+ > the reconciler is not implemented yet. Design:
19
+ > [rmartz/ai-tools#306](https://github.com/rmartz/ai-tools/issues/306), summarized
20
+ > in [docs/overview.md](docs/overview.md).
21
+
22
+ ## Documentation
23
+
24
+ See [docs/index.md](docs/index.md). Contributors (human or agent) should start with
25
+ [AGENTS.md](AGENTS.md).
26
+
27
+ ## Requirements
28
+
29
+ - Node.js >= 22
30
+ - pnpm 10 (pinned via `packageManager`)
31
+
32
+ Consuming repos will need neither — the published action runs on a GitHub-hosted
33
+ runner.
34
+
35
+ ## Local development
36
+
37
+ ```bash
38
+ NODE_AUTH_TOKEN=$(gh auth token) pnpm install
39
+ pnpm run build
40
+ pnpm run typecheck
41
+ pnpm run lint
42
+ pnpm run format:check
43
+ pnpm run test:coverage
44
+ pnpm run hygiene
45
+ ```
46
+
47
+ ## Releases
48
+
49
+ Versioned by [semantic-release](.releaserc.json): a push to `main` analyzes the
50
+ Conventional-Commit history since the last `v*` tag and, when a release is
51
+ warranted, publishes the package to GitHub Packages and creates the tag and
52
+ GitHub Release.
53
+
54
+ ## License
55
+
56
+ [MIT](LICENSE)
@@ -0,0 +1 @@
1
+ #!/usr/bin/env node
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ runCli
4
+ } from "../chunk-RQEBRPZU.js";
5
+
6
+ // src/bin/pr-lifecycle.ts
7
+ process.exitCode = await runCli(
8
+ process.argv.slice(2),
9
+ {
10
+ stdout: (line) => console.log(line),
11
+ stderr: (line) => console.error(line)
12
+ },
13
+ { env: process.env }
14
+ );