jenkinsci / jenkinsci/github-branch-source-plugin

Trigger builds on ready_for_review pull request event

Open
#1,514 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
Java
Stars
217
Forks
398
Avg merge
30m
Merged PRs (30d)
1

Description

### What feature do you want to see added?

The GitHub Branch Source plugin currently supports filtering draft pull requests (via the "Ignore pull requests marked as drafts"
trait introduced in https://github.com/jenkinsci/github-branch-source-plugin/pull/416), but it does not trigger new builds when a
draft PR is marked as ready for review.

This creates a workflow gap where:
1. Draft PRs are correctly ignored (no builds triggered)
2. When marked ready for review, no build is automatically triggered
3. Developers must manually trigger builds or wait for the next scheduled scan
4. Alternatively, developers must push a dummy commit to trigger a build

Please add support for the GitHub ready_for_review webhook event to automatically trigger builds when a draft pull request is marked as
ready for review.

GitHub webhook support:
GitHub's pull request webhooks already include the ready_for_review action type, which fires when a draft PR transitions to ready
status:
{
"action": "ready_for_review",
"pull_request": { ... }
}

Proposed behavior:
- When a draft PR is created → no build (existing behavior with draft filtering trait)
- When the PR is marked ready for review → automatic build triggered
- This would work seamlessly with the existing "Ignore pull requests marked as drafts" trait

### Upstream changes

_No response_

### Are you interested in contributing this feature?

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.