Skip to content

Commit 6d273e6

Browse files
Merge pull request #1638 from ehuss/draft-mention
Don't post mentions for draft PRs.
2 parents a2ae093 + ab24bf6 commit 6d273e6

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/github.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,8 @@ pub struct Issue {
255255
pub pull_request: Option<PullRequestDetails>,
256256
#[serde(default)]
257257
pub merged: bool,
258+
#[serde(default)]
259+
pub draft: bool,
258260
// API URL
259261
comments_url: String,
260262
#[serde(skip)]

src/handlers/mentions.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,13 @@ pub(super) async fn parse_input(
3737

3838
if !matches!(
3939
event.action,
40-
IssuesAction::Opened | IssuesAction::Synchronize
40+
IssuesAction::Opened | IssuesAction::Synchronize | IssuesAction::ReadyForReview
4141
) {
4242
return Ok(None);
4343
}
4444

45-
// Don't ping on rollups.
46-
if event.issue.title.starts_with("Rollup of") {
45+
// Don't ping on rollups or draft PRs.
46+
if event.issue.title.starts_with("Rollup of") || event.issue.draft {
4747
return Ok(None);
4848
}
4949

0 commit comments

Comments
 (0)