File tree Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -49,13 +49,20 @@ pub(super) async fn parse_input(
4949 return Ok ( None ) ;
5050 } ;
5151
52- // Only handle events when the PR is opened or the first comment is edited
53- let should_check = matches ! ( event. action, IssuesAction :: Opened | IssuesAction :: Edited ) ;
54- if !should_check || !event. issue . is_pr ( ) {
52+ // Only handle the event when the PR:
53+ // - is opened (and not a draft)
54+ // - is converted from draft to ready for review
55+ // - when the first comment is edited
56+ let skip_check = !matches ! (
57+ event. action,
58+ IssuesAction :: Opened | IssuesAction :: Edited | IssuesAction :: ReadyForReview
59+ ) ;
60+ if skip_check || !event. issue . is_pr ( ) || event. issue . draft {
5561 log:: debug!(
56- "Skipping backport event because: IssuesAction = {:?} issue.is_pr() {}" ,
62+ "Skipping backport event because: IssuesAction = {:?}, issue.is_pr() {}, draft = {}" ,
5763 event. action,
58- event. issue. is_pr( )
64+ event. issue. is_pr( ) ,
65+ event. issue. draft
5966 ) ;
6067 return Ok ( None ) ;
6168 }
You can’t perform that action at this time.
0 commit comments