Temporarily disable stale bot

This commit is contained in:
Lysandre 2021-03-06 00:21:50 -05:00
parent 88a951e3cc
commit fd01104435

View File

@ -42,13 +42,13 @@ def main():
and not any(label.name.lower() in LABELS_TO_EXEMPT for label in issue.get_labels()) and not any(label.name.lower() in LABELS_TO_EXEMPT for label in issue.get_labels())
): ):
print("Closing", issue) print("Closing", issue)
issue.create_comment( # issue.create_comment(
"This issue has been automatically marked as stale and been closed because it has not had " # "This issue has been automatically marked as stale and been closed because it has not had "
"recent activity. Thank you for your contributions.\n\nIf you think this still needs to be addressed" # "recent activity. Thank you for your contributions.\n\nIf you think this still needs to be addressed"
" please comment on this thread." # " please comment on this thread."
) # )
issue.add_to_labels("wontfix") # issue.add_to_labels("wontfix")
issue.edit(state="closed") # issue.edit(state="closed")
elif ( elif (
len(issue.assignees) > 0 len(issue.assignees) > 0
and (dt.utcnow() - issue.updated_at).days > 21 and (dt.utcnow() - issue.updated_at).days > 21
@ -58,9 +58,9 @@ def main():
print(f"Issue {issue.number}. Pinging {assignee.name} with message") print(f"Issue {issue.number}. Pinging {assignee.name} with message")
print(f"Hey @{assignee.login}, could you take a second look at this issue?") print(f"Hey @{assignee.login}, could you take a second look at this issue?")
issue.create_comment( # issue.create_comment(
f"Hey @{assignee.login}, could you take a second look at this issue?" # f"Hey @{assignee.login}, could you take a second look at this issue?"
) # )
if __name__ == "__main__": if __name__ == "__main__":