Skip to content

Commit e8502c9

Browse files
committed
Set milestone of the issue to newly created relnotes tracking issue
This is useful when the label(s) are added **after** the PR or issue has received the milestone in which case we may never set the milestone in the relnotes tracking issue.
1 parent c35ff9f commit e8502c9

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/handlers/relnotes.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,11 @@ cc {} -- origin issue/PR authors and assignees for starting to draft text
115115
vec!["relnotes".to_owned(), "relnotes-tracking-issue".to_owned()],
116116
)
117117
.await?;
118+
if let Some(milestone) = &e.issue.milestone {
119+
ctx.github
120+
.set_milestone(&e.issue.repository().to_string(), &milestone, resp.number)
121+
.await?;
122+
}
118123
state.data.relnotes_issue = Some(resp.number);
119124
state.save().await?;
120125
}

0 commit comments

Comments
 (0)