slash-commands: label cleanup + project status on /lgtm accept#17
Merged
Conversation
When /lgtm (or /lgtm force) accepts a PR: - Remove configurable staging labels (remove-labels-on-accept input, e.g. in-review,draft,proposal). Missing labels are ignored via the existing 404-tolerant removeLabel helper. - Move the PR to a configured status in an org-level Project V2 (project-number / project-status-field / project-accepted-option inputs). Resolves project, field, and option IDs via GraphQL, adds the PR to the project if not already present (addProjectV2ItemById is idempotent), then sets the single-select field. All optional — project update is skipped when project-number is empty. Requires the GitHub App to have Organization Projects:write for the project update. Failures are non-fatal (warned, not thrown) so a misconfigured project doesn't block the approval. :house: Remote-Dev: homespace
localden
added a commit
to modelcontextprotocol/modelcontextprotocol
that referenced
this pull request
Mar 28, 2026
When /lgtm accepts a PR: - Remove the in-review, draft, and proposal labels - Move the PR to the Accepted column in the SEP Review Pipeline project (org project #12) Depends on modelcontextprotocol/actions#17. Requires the MCP Commander App to have Organization Projects:write permission. :house: Remote-Dev: homespace
2 tasks
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
When
/lgtm(or/lgtm force) accepts a PR, optionally:remove-labels-on-acceptinput takes acomma-separated list (e.g.
in-review,draft,proposal). Missinglabels are silently ignored.
project-numberinput enables this. Resolves the project, its
Statussingle-selectfield (configurable via
project-status-field), and theAcceptedoption (configurable via
project-accepted-option). Adds the PR tothe project if not already present, then sets the field.
Both are opt-in — defaults are empty, so existing callers are unchanged.
Project update failures are warned, not thrown, so a missing permission
or misconfigured project doesn't block the approval flow.
New App permission required for project updates: Organization
Projects (write).
Test plan
@den/lgtm-accept-cleanupwithremove-labels-on-accept: in-review,draft,proposaland the SEPReview Pipeline project number
/lgtm forceon a PR within-reviewlabel → label removed,acceptedadded, PR moved to Accepted in the project/lgtmwithout project-number set → no project calls, labelsstill cleaned up
/lgtmwith wrong project-number → warning logged, approvalstill succeeds