@rmartz/pr-lifecycle
v10.4.1
Published
Event-driven PR lifecycle reconciler: recomputes a pull request's lifecycle labels from its current facts on every GitHub event and arms native auto-merge on approval.
Maintainers
Readme
@rmartz/pr-lifecycle
An event-driven pull-request lifecycle reconciler for GitHub Actions. On every
relevant GitHub event it recomputes a PR's lifecycle state from the PR's current
facts — draft status, pending bot review requests, the latest verdict from a
trusted author and the head SHA it reviewed — converges the PR's labels to match,
and arms GitHub-native auto-merge when the PR reaches approved. The
consumer's branch ruleset (required checks) then decides when the merge lands.
It joins the same family as
@rmartz/merge-safety,
@rmartz/repo-hygiene, and
@rmartz/bot-automerge: a small
TypeScript package distributed as a version-pinned action that Dependabot keeps
current in consuming repos.
It is run in consumer repos by
rmartz/pr-lifecycle-action. The
design is in docs/overview.md, and the pr-lifecycle CLI is
documented in docs/cli.md.
Documentation
See docs/index.md. Contributors (human or agent) should start with AGENTS.md.
Requirements
- Node.js >= 22
- pnpm 10 (pinned via
packageManager)
Consuming repos will need neither — the published action runs on a GitHub-hosted runner.
Local development
NODE_AUTH_TOKEN=$(gh auth token) pnpm install
pnpm run build
pnpm run typecheck
pnpm run lint
pnpm run format:check
pnpm run test:coverage
pnpm run hygieneReleases
Versioned by semantic-release: a push to main analyzes the
Conventional-Commit history since the last v* tag and, when a release is
warranted, publishes the package to npmjs (public, via OIDC trusted publishing
with provenance) and creates the tag and GitHub Release. Versions up to 5.0.0
were published to GitHub Packages and stay there for existing pins.
