Skip to content

Commit 68de8c8

Browse files
committed
Exclude drafts from auto-backport nominate
1 parent 7ab36ca commit 68de8c8

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/handlers/backport.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,14 @@ pub(super) async fn parse_input(
5050
None => return Ok(None),
5151
};
5252

53-
// Only handle events when the PR is opened or the first comment is edited
53+
// Only handle events when the PR is opened (and it's not a draft) or when the first comment is edited
5454
let should_check = matches!(event.action, IssuesAction::Opened | IssuesAction::Edited);
55-
if !should_check || !event.issue.is_pr() {
55+
if !should_check || !event.issue.is_pr() || event.issue.draft {
5656
log::debug!(
57-
"Skipping backport event because: IssuesAction = {:?} issue.is_pr() {}",
57+
"Skipping backport event because: IssuesAction = {:?}, issue.is_pr() {}, draft = {}",
5858
event.action,
59-
event.issue.is_pr()
59+
event.issue.is_pr(),
60+
event.issue.draft
6061
);
6162
return Ok(None);
6263
}

0 commit comments

Comments
 (0)