Add project board Status automation and fix duplicate comments#149
Open
edmundmiller wants to merge 4 commits into
Open
Add project board Status automation and fix duplicate comments#149edmundmiller wants to merge 4 commits into
edmundmiller wants to merge 4 commits into
Conversation
The issue templates declare labels (e.g. new-pipeline, proposed) and a project, so opening a proposal fires the issues 'opened' event plus several 'labeled' events almost simultaneously. With no concurrency control, multiple approval workflow runs raced and each created its own status comment, leaving duplicate '## Approval status: Pending' comments (e.g. issue #148). - Add a per-issue concurrency group to the pipeline, RFC and SIG approval workflows so runs for the same issue execute serially instead of racing. - Make updateStatusComment self-healing: it now deletes any extra duplicate status comments and guards against comments with no body. - Add tests for duplicate cleanup and null comment bodies.
Auto-set the project board Status (project 104) from the pipeline approval automation, replacing the manual curator step documented in the README: - Add ApprovalManager.updateProjectStatus(projectNumber, statusOptionName), which resolves the project's Status single-select field via the Projects v2 GraphQL API, ensures the issue is on the board, and sets the option matching the approval state (proposed / accepted / turned-down / timed-out). It is best-effort: missing project scope, field, option, or board membership is logged and swallowed so labels/comments are never affected. - Wire it into pipeline_proposals.yml at the opened, timed-out and main paths. - Add tests for the matching, no-op and error-handling behaviour. Prep native issue types (org-owner action required before merge): - Add a type: key to the pipeline / RFC / SIG issue-form templates. - Document the one-time org setup (issue types + bot project scope) in .github/AUTOMATION_SETUP.md and reference it from the README.
Issue types are redundant with the existing templates, labels and project boards, and referencing not-yet-created org types in the templates would break issue creation. Remove the type: keys and reframe the issue-types section of the setup doc as an optional, not-currently-enabled enhancement.
📊 Test Coverage Report
Tests: 110 statements covered out of 114 🎉 Excellent coverage! |
Collapse the numbered list items onto single lines so prettier no longer emits 3-space continuation indents, which editorconfig-checker rejected (indent_size = 2 requires left-padding to be a multiple of 2).
6 tasks
8d07e8c to
788225d
Compare
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.
Summary
This PR enhances the proposal approval automation to mirror approval status onto GitHub Project (v2) boards, and fixes a race condition that could create duplicate status comments.
Key Changes
Project Board Integration: Added
updateProjectStatus()method to automatically set theStatusfield on the pipelines project board (and optionally RFC/SIG boards) based on approval status:proposedfor pending proposalsacceptedfor approved proposalsturned-downfor rejected proposalstimed-outfor timed-out proposalsDuplicate Comment Fix: Enhanced
updateStatusComment()to detect and delete duplicate status comments that can be created by a race condition between theopenedevent andlabeledevents fired by issue templates. The method now:Workflow Concurrency: Added
concurrencyconfiguration to all three approval workflows (pipeline_proposals.yml,rfc_approval.yml,sig_approval.yml) to serialize runs per issue, preventing the race condition that creates duplicate commentsDocumentation: Added
.github/AUTOMATION_SETUP.mdwith setup instructions for org owners, including:Tests: Added comprehensive test coverage for:
README Updates: Updated documentation to reflect the new project board automation and link to setup instructions
Implementation Details
projectscope or fine-grainedProjects → Read and write)https://claude.ai/code/session_01DGsyWUGbsvfkJDgdcaYLxv