Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[CI] implement a bot to remind prs to link issues if not.#13744

Merged
sayakpaul merged 16 commits into
mainfrom
remind-pr-issues
Jun 13, 2026
Merged

[CI] implement a bot to remind prs to link issues if not.#13744
sayakpaul merged 16 commits into
mainfrom
remind-pr-issues

Conversation

@sayakpaul

@sayakpaul sayakpaul commented May 14, 2026

Copy link
Copy Markdown
Member

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

@github-actions github-actions Bot added CI size/M PR with diff < 200 LOC labels May 14, 2026

@yiyixuxu yiyixuxu left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

thanks, i left one feedback

Comment thread utils/remind_link_issue.py Outdated
@sayakpaul sayakpaul requested a review from yiyixuxu May 15, 2026 07:50

@sergereview sergereview Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🤗 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

  1. Runs daily at 07:30 UTC (and on manual dispatch).
  2. Iterates over every open PR in huggingface/diffusers.
  3. Skips: draft PRs, bot authors, PRs with the no-issue-needed label, PRs that already have a linked issue, and PRs that already received the reminder comment.
  4. 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 a TypeError on None["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

Comment thread utils/remind_link_issue.py Outdated
Comment thread utils/remind_link_issue.py Outdated

@yiyixuxu yiyixuxu left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

thanks, I left one comment
in addition to serge's

Comment thread utils/remind_link_issue.py Outdated

@yiyixuxu yiyixuxu left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

thanks a lot!

@sayakpaul sayakpaul merged commit f7f1f63 into main Jun 13, 2026
14 of 16 checks passed
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>
@sayakpaul sayakpaul deleted the remind-pr-issues branch July 3, 2026 03:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI size/M PR with diff < 200 LOC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants