Skip to content

feat(review): let review mode convert a pull request to draft when it is genuinely unfinished - #58

Merged
Mearman merged 1 commit into
mainfrom
feat/mark-draft-if-unready
Sep 11, 2026
Merged

feat(review): let review mode convert a pull request to draft when it is genuinely unfinished#58
Mearman merged 1 commit into
mainfrom
feat/mark-draft-if-unready

Conversation

@Mearman

@Mearman Mearman commented Sep 11, 2026

Copy link
Copy Markdown
Member

Adds mark_draft_if_unready, a new review-mode input, off by default.

When on, review checks for an explicit, concrete unreadiness signal on the pull request itself: a "WIP"/"do not merge"/"not ready for review" marker in the title, description, or commits, or a diff that is self-evidently incomplete for its own stated purpose (an unimplemented stub, unresolved merge-conflict markers). Only on one of those does it convert the pull request to draft, via mcp__github__update_pull_request, setting draft: true and nothing else.

It never fires on ordinary review findings. A finished pull request with real bugs, missing tests, or Blocker/Should-fix comments is reviewed and blocked in the normal way, not marked draft; draft is about the author evidently still being mid-work, not about code quality. It also never sets draft: false (un-drafting stays a human decision), and it never lets the review submit APPROVED on a pull request it has just converted.

The underlying tool grant is shared with fix_pr_metadata (both gate the same mcp__github__update_pull_request entry), so turning this on alongside fix_pr_metadata adds no new tool surface. It defaults off, unlike fix_pr_metadata, because a subverted review abusing this could pull a genuinely-ready pull request out of reviewers' visible queues, a more consequential mistake than misstating a title or body — documented in the README's security notes alongside the existing fix_pr_metadata guidance.

Wired through action.yml (input, validation, prompt facts, allowlist grant) and the review.yml reusable workflow's passthrough inputs; no change needed to the direct-form examples since the new input defaults to false.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 11, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
🔒 Security Review Completed 2026-09-11T09:52:15.214830Z 18920c1 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

… is genuinely unfinished

Add mark_draft_if_unready, off by default, for review mode: on an explicit,
concrete unreadiness signal (a WIP/not-ready marker in the title, description,
or commits, or a diff that is self-evidently incomplete for its own stated
purpose), it sets draft: true via mcp__github__update_pull_request, never
draft: false and never any other field. It never fires on ordinary review
findings; a finished pull request with bugs, missing tests, or Blocker/
Should-fix comments is reviewed and blocked normally, not marked draft. It
also never lets the review approve a pull request it has just converted.

Shares the same mcp__github__update_pull_request grant fix_pr_metadata
already uses, so no new tool surface is added when both are on. Defaults off,
unlike fix_pr_metadata, because converting a genuinely-ready pull request to
draft on a subverted review pulls it out of reviewers' visible queues, a more
consequential mistake than only misstating its title or body.
@Mearman
Mearman force-pushed the feat/mark-draft-if-unready branch from 18920c1 to 7aefb03 Compare September 11, 2026 11:25

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean, well-scoped addition. Traced mark_draft_if_unready through every touchpoint — action.yml validation, the MODE != review guard, the shared mcp__github__update_pull_request allowlist grant (correctly OR'd with fix_pr_metadata so the tool isn't double-added), the "This run" facts block, review.yml's passthrough, both README locations (security notes + extended options), and prompts/review/base.md — all consistent with each other and with the stated rationale (defaults off, unlike fix_pr_metadata, because it changes PR visibility/review-request state rather than just title/body text).

No other open PR touches this area (checked #47, #41, #22, #59, #60), and no open issue tracks this, so nothing to reference. Title and description already name the change specifically and explain the why — nothing to rewrite. This is a first review of this PR, so no stale threads/reviews to clean up.

Nothing to flag — approving.

@github-actions

Copy link
Copy Markdown

🗜️ Headroom context compression

Metric Value
Requests proxied 41
Tokens saved 70245
Aggregate savings 1.3% of all tokens sent
Average per-request compression 1.8%

@Mearman
Mearman merged commit 1a47695 into main Sep 11, 2026
13 checks passed
@Mearman
Mearman deleted the feat/mark-draft-if-unready branch September 11, 2026 11:31
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 1.12.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant