File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -237,6 +237,11 @@ impl ExistingGithubIssue {
237
237
pub fn was_locked ( & self ) -> bool {
238
238
self . comments . iter ( ) . any ( |c| c. body . trim ( ) == LOCK_TEXT )
239
239
}
240
+
241
+ /// True if we have a label with the given name.
242
+ pub fn has_label ( & self , name : & str ) -> bool {
243
+ self . labels . iter ( ) . any ( |label| label. name == name)
244
+ }
240
245
}
241
246
242
247
pub fn lock_issue ( repository : & Repository , number : u64 ) -> anyhow:: Result < ( ) > {
Original file line number Diff line number Diff line change @@ -225,7 +225,7 @@ fn try_checkboxes(issue: &ExistingGithubIssue) -> anyhow::Result<Progress> {
225
225
}
226
226
227
227
fn is_flagship ( issue : & ExistingGithubIssue ) -> bool {
228
- issue. labels . iter ( ) . any ( |label| label . name == "flagship" )
228
+ issue. has_label ( "flagship" )
229
229
}
230
230
231
231
fn updates ( comments : Vec < ExistingGithubComment > ) -> Vec < TrackingIssueUpdate > {
You can’t perform that action at this time.
0 commit comments