From e8502c9527c283c86b5d1f87a9e9883c0140841b Mon Sep 17 00:00:00 2001 From: Urgau Date: Wed, 11 Sep 2024 07:52:34 +0200 Subject: [PATCH] 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. --- src/handlers/relnotes.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/handlers/relnotes.rs b/src/handlers/relnotes.rs index b0e3bb10..5e7f7394 100644 --- a/src/handlers/relnotes.rs +++ b/src/handlers/relnotes.rs @@ -115,6 +115,11 @@ cc {} -- origin issue/PR authors and assignees for starting to draft text vec!["relnotes".to_owned(), "relnotes-tracking-issue".to_owned()], ) .await?; + if let Some(milestone) = &e.issue.milestone { + ctx.github + .set_milestone(&e.issue.repository().to_string(), &milestone, resp.number) + .await?; + } state.data.relnotes_issue = Some(resp.number); state.save().await?; }