Skip to content

Conversation

LysandreJik
Copy link
Member

Fixes the stale bot

@LysandreJik LysandreJik requested a review from ydshieh October 9, 2023 13:26
open_issues = repo.get_issues(state="open")

for issue in open_issues:
print(issue)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm leaving this print in in case we'd like to debug; it wasn't possible previously.

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Oct 9, 2023

The documentation is not available anymore as the PR was closed or merged.

last_comment is not None and last_comment.user.login == "github-actions[bot]"
and (dt.utcnow() - issue.updated_at).days > 7
and (dt.utcnow() - issue.created_at).days >= 30
and (dt.utcnow() - issue.updated_at.replace(tzinfo=None)).days > 7
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so the cause is some API changes from GitHub?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I believe so

Copy link
Collaborator

@ydshieh ydshieh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for saving the poor bot's life!

@LysandreJik LysandreJik merged commit 87b4ade into main Oct 9, 2023
@LysandreJik LysandreJik deleted the fix-stalebot branch October 9, 2023 14:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants