mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-14 23:21:35 +00:00
Fix bugs in auto-close PR triage scripts
- close_low_quality_prs.py: Treat author_association API lookup failures as internal (fail-safe) so transient errors don't cause internal contributors' PRs to be auto-closed. - triage_with_llm.py: Update summary heading from 'Would post comment:' to 'Posted comment:' since this branch only runs after the comment has already been posted. Co-authored-by: Yassin Kortam <yassin@berri.ai>
This commit is contained in:
parent
401433374d
commit
edddf0c179
2 changed files with 5 additions and 2 deletions
5
.github/scripts/close_low_quality_prs.py
vendored
5
.github/scripts/close_low_quality_prs.py
vendored
|
|
@ -116,7 +116,10 @@ def is_external_pr_author(pr: dict, repo: str | None) -> bool:
|
|||
if login.endswith("[bot]") or login in {"dependabot", "github-actions"}:
|
||||
return False
|
||||
association = fetch_pr_author_association(pr["number"], repo)
|
||||
if association in INTERNAL_AUTHOR_ASSOCIATIONS:
|
||||
# Fail-safe: if the API lookup failed (empty string), treat the author as
|
||||
# internal so we don't auto-close their PR. Auto-close is destructive, so
|
||||
# an unknown association should never make a PR eligible for closing.
|
||||
if not association or association in INTERNAL_AUTHOR_ASSOCIATIONS:
|
||||
return False
|
||||
return True
|
||||
|
||||
|
|
|
|||
2
.github/scripts/triage_with_llm.py
vendored
2
.github/scripts/triage_with_llm.py
vendored
|
|
@ -520,7 +520,7 @@ def render_summary(result: dict) -> str:
|
|||
comment = result.get("comment")
|
||||
if comment:
|
||||
lines.append("")
|
||||
lines.append("### Would post comment:")
|
||||
lines.append("### Posted comment:")
|
||||
lines.append("")
|
||||
lines.append("> " + comment.replace("\n", "\n> "))
|
||||
return "\n".join(lines)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue