Skip to content

Commit 0d8a472

Browse files
committed
Add debug lines
1 parent dd8ed71 commit 0d8a472

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

scripts/stubsabot.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -892,6 +892,7 @@ async def delete_closed_stubsabot_branches(session: aiohttp.ClientSession) -> No
892892
continue
893893
branch = ref.removeprefix("refs/heads/")
894894

895+
print(f"{branch=}")
895896
# Fetch all open PRs for an existing branch:
896897
async with session.get(
897898
f"{TYPESHED_API_URL}/pulls",
@@ -901,11 +902,15 @@ async def delete_closed_stubsabot_branches(session: aiohttp.ClientSession) -> No
901902
response.raise_for_status()
902903
open_prs = await response.json()
903904

905+
print(len(open_prs))
906+
"""
904907
# If we don't have an open PR for an existing branch,
905908
# it means PR was closed and branch was forgotten to be deleted:
906909
if not open_prs:
907910
print(colored(f"Deleting branch {branch} on origin...", "red"))
908911
subprocess.check_call(["git", "push", "origin", "--delete", branch])
912+
"""
913+
subprocess.check_call(["git", "push", "origin", "--delete", f"refs/heads/{BRANCH_PREFIX}/braintree"])
909914

910915

911916
async def suggest_typeshed_update(update: Update, session: aiohttp.ClientSession, action_level: ActionLevel) -> None:

0 commit comments

Comments
 (0)