Skip to content

Trigger workflow when PR is marked ready for review#1753

Merged
janfb merged 1 commit intosbi-dev:mainfrom
satwiksps:ci-ready-trigger
Feb 5, 2026
Merged

Trigger workflow when PR is marked ready for review#1753
janfb merged 1 commit intosbi-dev:mainfrom
satwiksps:ci-ready-trigger

Conversation

@satwiksps
Copy link
Contributor

Description

This is a suggestion based on my personal experience to smooth out the contribution workflow. If this limitation is intentional (e.g., to save runner resources) or preferred by the maintainers, I am completely fine with rejecting the PR without merging

This PR updates the Continuous Integration (CI) workflow to automatically trigger when a Pull Request is converted from "Draft" to "Ready for Review"

Currently, the ci.yml workflow is configured to skip runs on Draft PRs which is fine. However, because the default pull_request trigger only listens for opened, synchronize, and reopened events, the CI pipeline ignores the ready_for_review event

So when a contributor marks a Draft PR as "Ready for Review," the CI does not run. Contributors are forced to push an empty commit (e.g., git commit --allow-empty) just to trigger the tests. This PR removes that friction to improve DX

Changes

  • Modified .github/workflows/ci.yml to explicitly define pull_request trigger types
  • Added ready_for_review to the list of types, ensuring the workflow captures the transition from Draft to Ready

Previously, the CI workflow utilized the default pull_request trigger, which does not listen for the ready_for_review event. This caused the CI to remain idle when a Draft PR was promoted to Ready, requiring manual empty commits to trigger the tests.

This change explicitly defines the pull request types to include ready_for_review, ensuring the CI pipeline runs automatically when a PR status changes from Draft to Ready.
@codecov
Copy link

codecov bot commented Feb 3, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.54%. Comparing base (937efc2) to head (2549770).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1753   +/-   ##
=======================================
  Coverage   88.54%   88.54%           
=======================================
  Files         137      137           
  Lines       11515    11515           
=======================================
  Hits        10196    10196           
  Misses       1319     1319           
Flag Coverage Δ
fast 82.09% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Copy link
Contributor

@janfb janfb left a comment

Choose a reason for hiding this comment

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

absolute agree, this makes a lot of sense, thanks @satwiksps 🙌

@janfb janfb merged commit 8adf15f into sbi-dev:main Feb 5, 2026
8 of 9 checks passed
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