Skip to content

ci: mark draft PRs without [WIP] prefix as ready for review - #33

Merged
fupacat merged 1 commit into
masterfrom
ci/undraft-non-wip-prs
Oct 12, 2026
Merged

fupacat merged 1 commit into
masterfrom
ci/undraft-non-wip-prs

Conversation

@fupacat

@fupacat fupacat commented Oct 12, 2026

Copy link
Copy Markdown
Owner

Summary

Adds a GitHub Actions workflow (.github/workflows/ready-for-review.yml) that automatically converts draft pull requests to ready-for-review status unless their title begins with [WIP].

Behavior

  • Triggers on pull_request_target for opened, converted_to_draft, and edited events.
  • Evaluates: if: github.event.pull_request.draft == true && !startsWith(github.event.pull_request.title, '[WIP]')
  • Calls the GitHub GraphQL mutation markPullRequestReadyForReview using GITHUB_TOKEN (pull-requests: write permission).
  • PRs prefixed with [WIP] remain in draft.

Copilot AI balanced review requested due to automatic review settings October 12, 2026 19:28
@fupacat
fupacat enabled auto-merge (squash) October 12, 2026 19:29
@fupacat
fupacat merged commit 5d4cd8d into master Oct 12, 2026
6 checks passed
@fupacat
fupacat deleted the ci/undraft-non-wip-prs branch October 12, 2026 19:31

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

It introduces a privileged pull_request_target workflow that uses a write-scoped token to mutate PR state, a security-sensitive CI surface that warrants human sign-off even though no concrete defects were found.

0 open findings

What changed in this PR

This PR adds a new GitHub Actions workflow (.github/workflows/ready-for-review.yml) that automatically converts draft pull requests to "ready for review" unless the PR title begins with [WIP]. It fits into the repository's existing CI automation (ci.yml, release.yml, codeql.yml, sonar.yml) by streamlining the review lifecycle, so contributors signal ongoing work explicitly via a [WIP] title prefix rather than relying on GitHub's draft state.

Changes:

  • Triggers on pull_request_target for opened, converted_to_draft, and edited events.
  • Guards execution with draft == true && !startsWith(title, '[WIP]') so only non-[WIP] drafts are affected.
  • Invokes the markPullRequestReadyForReview GraphQL mutation via gh, using a pull-requests: write job-scoped GITHUB_TOKEN and passing PR data through environment variables.
File Description
.github/​workflows/​ready-for-review.yml New workflow that marks non-[WIP] draft PRs as ready for review via the GitHub GraphQL API.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants