Skip to content

Commit

Permalink
[stalebot] fix a bug (huggingface#7156)
Browse files Browse the repository at this point in the history
fix

Co-authored-by: yiyixuxu <yixu310@gmail,com>
  • Loading branch information
yiyixuxu and yiyixuxu authored Mar 1, 2024
1 parent 9a2600e commit ec95304
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions utils/stale.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def main():
open_issues = repo.get_issues(state="open")

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

0 comments on commit ec95304

Please sign in to comment.