Skip to content

meta: automatically mark unfinished PRs as draft - #18197

Merged
ephys merged 5 commits into
mainfrom
ephys/draft-unfinished-prs.yml
Apr 5, 2026
Merged

ephys merged 5 commits into
mainfrom
ephys/draft-unfinished-prs.yml

Conversation

@ephys

@ephys ephys commented Apr 5, 2026 •

Copy link
Copy Markdown
Member

Pull Request Checklist

  • Have you added new tests to prevent regressions?
  • If a documentation update is necessary, have you opened a PR to the documentation repository?
  • Did you update the typescript typings accordingly (if applicable)?
  • Does the description below contain a link to an existing issue (Closes #[issue]) or a description of the issue you are solving?
  • Does the name of your PR follow our conventions?

Description of Changes

This PR adds a new action to the stale workflow that automatically marks as draft all PRs that are not finished: https://github.com/sequelize/draft-unfinished-prs/

Here is a demo run on this repo: https://github.com/sequelize/sequelize/actions/runs/24003949292/job/70004450175

The broader goal is to close dead pull requests following these steps & warnings:

List of Breaking Changes

Summary by CodeRabbit

  • Chores
    • Improved CI workflow for PR management: added a pre-processing step to draft unfinished pull requests.
    • Expanded workflow permissions to support additional checks.
    • Clarified workflow step names for more transparent stale-issue/pr handling while preserving existing behavior.

@coderabbitai

coderabbitai Bot commented Apr 5, 2026 •

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 964682ad-5696-41de-8a49-86938fe8ad2f

📥 Commits

Reviewing files that changed from the base of the PR and between 904b45c and 92c0cb0.

📒 Files selected for processing (1)
  • .github/workflows/stale.yml

📝 Walkthrough

Walkthrough

The GitHub Actions workflow (.github/workflows/stale.yml) adds checks: read permission, inserts a new sequelize/draft-unfinished-prs@<sha> step named “Draft unfinished PRs” that runs before stale processing, and gives names to three existing actions/stale steps without changing their ids or behavior.

Changes

Cohort / File(s) Summary
Workflow Permissions & Steps
.github/workflows/stale.yml
Added checks: read permission; added new Draft unfinished PRs step (sequelize/draft-unfinished-prs@<sha>) executed before stale handling; renamed three actions/stale@<sha> invocations via name: while preserving id and with config.

Sequence Diagram(s)

sequenceDiagram
  participant Workflow as "GitHub Workflow"
  participant DraftAction as "Draft Unfinished PRs Action"
  participant ChecksAPI as "GitHub Checks API"
  participant StaleAction as "actions/stale"

  Workflow->>DraftAction: run "Draft unfinished PRs" step
  DraftAction->>ChecksAPI: read checks for open PRs (requires checks: read)
  ChecksAPI-->>DraftAction: return check statuses
  DraftAction->>Workflow: mark PRs as draft/unfinished (via GH API)
  Workflow->>StaleAction: run "Mark stale ..." steps (existing stale logic)
  StaleAction->>Workflow: label/close stale issues & PRs
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 I hop through YAML, gentle and spry,
I read the checks and give PRs a try,
Drafts get nudged before stale takes flight,
CI whispers truth in the softest light. 🥕

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'meta: automatically mark unfinished PRs as draft' directly and clearly summarizes the main change: adding a GitHub Actions workflow step to automatically mark unfinished pull requests as draft.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ephys/draft-unfinished-prs.yml

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@ephys
ephys marked this pull request as ready for review April 5, 2026 14:57
@ephys
ephys requested a review from a team as a code owner April 5, 2026 14:57
@ephys
ephys requested review from WikiRik and sdepold April 5, 2026 14:57
coderabbitai[bot]

This comment was marked as resolved.

@WikiRik WikiRik left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Let's test this out

@ephys
ephys enabled auto-merge (squash) April 5, 2026 15:40
@ephys
ephys merged commit 1926dd5 into main Apr 5, 2026
79 checks passed
@ephys
ephys deleted the ephys/draft-unfinished-prs.yml branch April 5, 2026 15:44
@coderabbitai coderabbitai Bot mentioned this pull request Apr 5, 2026
1 of 5 tasks
papandreou added a commit to papandreou/sequelize that referenced this pull request Apr 15, 2026
* main: (200 commits)
  meta: update actions/upload-artifact action to v7.0.1 (sequelize#18212)
  meta: update sequelize AUTHORS (sequelize#18208)
  feat(cli): add migration generate, run, status & undo (sequelize#18193)
  feat(core): Drop the ability to specify the dialect as a string (sequelize#18204)
  feat: update some dialect adapters (sequelize#18189)
  feat(postgres): replace pg-hstore with inline hstore parser (sequelize#18151)
  feat(core): add `sql.random`, improve `Order` typing (sequelize#18203)
  meta: use Sequelize Bot for drafting PRs (sequelize#18201)
  meta: automatically mark unfinished PRs as draft (sequelize#18197)
  meta: update dependency @oclif/test to v4.1.18 (sequelize#18198)
  fix(core): replace @typeparam with @template in JSDoc (sequelize#18094)
  feat(core): Add support for UUID v7 (sequelize#17832)
  meta: update sequelize AUTHORS (sequelize#18190)
  meta: update dependency @oclif/plugin-help to ^6.2.43 (sequelize#18195)
  meta: update dependency esbuild to v0.28.0 (sequelize#18192)
  meta: update dependency @oclif/plugin-help to ^6.2.42 (sequelize#18191)
  meta: update dependency @oclif/core to ^4.10.5 (sequelize#18187)
  meta: update sequelize AUTHORS (sequelize#18158)
  feat: add Node 24 support, drop Node 18 (sequelize#18185)
  feat(core): add support for readonly attribute arrays (sequelize#18186)
  ...
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