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 {
237237 pub fn was_locked ( & self ) -> bool {
238238 self . comments . iter ( ) . any ( |c| c. body . trim ( ) == LOCK_TEXT )
239239 }
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+ }
240245}
241246
242247pub 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> {
225225}
226226
227227fn is_flagship ( issue : & ExistingGithubIssue ) -> bool {
228- issue. labels . iter ( ) . any ( |label| label . name == "flagship" )
228+ issue. has_label ( "flagship" )
229229}
230230
231231fn updates ( comments : Vec < ExistingGithubComment > ) -> Vec < TrackingIssueUpdate > {
You can’t perform that action at this time.
0 commit comments