Skip to content

Commit ec95304

Browse files
yiyixuxuyiyixuxu
andauthored
[stalebot] fix a bug (huggingface#7156)
fix Co-authored-by: yiyixuxu <yixu310@gmail,com>
1 parent 9a2600e commit ec95304

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

utils/stale.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def main():
3939
open_issues = repo.get_issues(state="open")
4040

4141
for issue in open_issues:
42-
labels = [label.name for label in issue.get_labels()]
42+
labels = [label.name.lower() for label in issue.get_labels()]
4343
if "stale" in labels:
4444
comments = sorted(issue.get_comments(), key=lambda i: i.created_at, reverse=True)
4545
last_comment = comments[0] if len(comments) > 0 else None
@@ -50,7 +50,7 @@ def main():
5050
elif (
5151
(dt.now(timezone.utc) - issue.updated_at).days > 23
5252
and (dt.now(timezone.utc) - issue.created_at).days >= 30
53-
and not any(label.name.lower() in LABELS_TO_EXEMPT for label in labels)
53+
and not any(label in LABELS_TO_EXEMPT for label in labels)
5454
):
5555
# Post a Stalebot notification after 23 days of inactivity.
5656
issue.create_comment(

0 commit comments

Comments
 (0)