feat: automate project board PR status transitions - #9732
Draft
matthewkeil wants to merge 14 commits into
Draft
Conversation
Add github.ts (GraphQL client, project config resolution, PR fetch, status mutation, board sweep listing) and main.ts (CLI entrypoint supporting event, --sweep, and --pr modes). Also add a package.json with "type": "module" scoped to this directory: without it, tsc's nodenext module resolution treats main.ts as CommonJS (no ancestor package.json declares a module type) and rejects its top-level await, even though Node's runtime syntax detection already handles it correctly.
Removes a shell-injection surface in the reconcile run-line by passing the workflow_dispatch pr input through an env var instead of inline expression interpolation, adds a startup mode log and upfront validation that every STATUS_TO_LANE entry exists as a board option (fails loudly in dry-run instead of only at write time), null-guards a missing GraphQL organization, adds job timeouts, documents the PROJECT_BOARD_DRY_RUN variable's scope and concurrency caveat in the caller template, and clarifies the tie-break rule in the spec to match the existing implementation.
The live board's "Review Requested" option was renamed in place (was "Review Ready/Requested"); update STATUS_TO_LANE and the matching plan doc excerpt to match so the reconciler's lane validation resolves correctly again.
… to managed lanes Statusless and stale cards must never be touched automatically by the sweep. Initial placement (adding the card via addProjectV2ItemById if the built-in auto-add hasn't landed it yet, then setting its lane) moves to event runs and the --pr path; the sweep goes back to only recomputing cards already sitting in the three automated lanes.
Contributor
Performance Report🚀🚀 Significant benchmark improvement detected
Full benchmark results
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Automates the swim lane movement for PR cards on the Lodestar Team Coordination board. The behavior contract lives in
.github/specs/project-automation.md. Is worth reading before the code.Other repos on the board opt in later via the thin caller template (
.github/specs/project-board-caller.yml).