Skip to content

Commit 4ff1a9f

Browse files
committed
Copy over labels to the relnote tracking issue
1 parent 801fe08 commit 4ff1a9f

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

src/handlers/relnotes.rs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,18 @@ cc {} -- origin issue/PR authors and assignees for starting to draft text
116116
&e.issue.repository(),
117117
&title,
118118
&body,
119-
vec!["relnotes".to_owned(), "relnotes-tracking-issue".to_owned()],
119+
["relnotes", "relnotes-tracking-issue"]
120+
.into_iter()
121+
.chain(e.issue.labels.iter().map(|l| &*l.name).filter(|l| {
122+
l.starts_with("A-") // A-* (area)
123+
|| l.starts_with("F-") // F-* (feature)
124+
|| l.starts_with("L-") // L-* (lint)
125+
|| l.starts_with("O-") // O-* (OS)
126+
|| l.starts_with("T-") // T-* (team)
127+
|| l.starts_with("WG-") // WG-* (working group)
128+
}))
129+
.map(ToOwned::to_owned)
130+
.collect::<Vec<_>>(),
120131
)
121132
.await?;
122133
if let Some(milestone) = &e.issue.milestone {

0 commit comments

Comments
 (0)