diff --git a/.github/scripts/close_low_quality_prs.py b/.github/scripts/close_low_quality_prs.py index 6338ad380ce..95335aec167 100644 --- a/.github/scripts/close_low_quality_prs.py +++ b/.github/scripts/close_low_quality_prs.py @@ -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 diff --git a/.github/scripts/triage_with_llm.py b/.github/scripts/triage_with_llm.py index 3062770dbe9..1c6c87aeb0b 100644 --- a/.github/scripts/triage_with_llm.py +++ b/.github/scripts/triage_with_llm.py @@ -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)