[CI] implement a bot to remind prs to link issues if not.#13744
Merged
Conversation
yiyixuxu
reviewed
May 15, 2026
yiyixuxu
left a comment
Collaborator
There was a problem hiding this comment.
thanks, i left one feedback
Contributor
There was a problem hiding this comment.
🤗 Serge says:
The script implements a daily cron job that scans open, non-draft PRs and posts a single reminder comment if the PR has no linked issue (via GitHub's GraphQL closingIssuesReferences). Bot-authored PRs and PRs labeled no-issue-needed are skipped. The reminder is posted at most once per PR (detected by an HTML comment marker).
Current behavior in plain English
- Runs daily at 07:30 UTC (and on manual dispatch).
- Iterates over every open PR in
huggingface/diffusers. - Skips: draft PRs, bot authors, PRs with the
no-issue-neededlabel, PRs that already have a linked issue, and PRs that already received the reminder comment. - For the remaining PRs, posts a single friendly comment asking the author to link an issue.
Correctness
- GraphQL error handling is missing. The GitHub GraphQL API can return HTTP 200 with
{"errors": [...], "data": null}. The current code will raise aTypeErroronNone["repository"], crashing the script mid-loop and leaving all subsequent PRs unprocessed. - No per-PR error isolation. Any transient failure (network timeout, secondary rate limit, deleted PR race) kills the entire run. Wrapping the per-PR logic in a try/except would make the bot much more robust.
model: claude-opus-4-6 · 6 LLM turns · 7 tool calls · 40.9s · 54700 in / 1712 out tokens
yiyixuxu
reviewed
Jun 11, 2026
yiyixuxu
left a comment
Collaborator
There was a problem hiding this comment.
thanks, I left one comment
in addition to serge's
Co-authored-by: sergereview[bot] <283583894+sergereview[bot]@users.noreply.github.com>
76 tasks
DN6
pushed a commit
that referenced
this pull request
Jul 1, 2026
* implement a bot to remind prs to link issues if not. * up * remove auto-close and add contribution guide. * restrict to one comment * Apply suggestions from code review Co-authored-by: sergereview[bot] <283583894+sergereview[bot]@users.noreply.github.com> * put dodgy stuff in try-except * limit to 2 days * style. --------- Co-authored-by: sergereview[bot] <283583894+sergereview[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
We implemented a system in #13380 to better tag issues and PRs for managing the maintenance load better ourselves. This was also to better prioritize PRs that are genuine and fix issues users are facing.
To build on top of that, this PR implements a system to periodically remind PR authors if their PR isn't linked to an existing issue(s). We post three reminders (each 7 days apart) and
close the PR automatically after that with an explanation.Testing here: sayakpaul/qwenimage-ptxla#3