Skip to content

Commit 5297055

Browse files
committed
Comment delete branch command
1 parent 0d8a472 commit 5297055

1 file changed

Lines changed: 4 additions & 7 deletions

File tree

scripts/stubsabot.py

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

895-
print(f"{branch=}")
896895
# Fetch all open PRs for an existing branch:
897896
async with session.get(
898897
f"{TYPESHED_API_URL}/pulls",
@@ -902,15 +901,13 @@ async def delete_closed_stubsabot_branches(session: aiohttp.ClientSession) -> No
902901
response.raise_for_status()
903902
open_prs = await response.json()
904903

905-
print(len(open_prs))
906-
"""
907904
# If we don't have an open PR for an existing branch,
908905
# it means PR was closed and branch was forgotten to be deleted:
909906
if not open_prs:
910-
print(colored(f"Deleting branch {branch} on origin...", "red"))
911-
subprocess.check_call(["git", "push", "origin", "--delete", branch])
912-
"""
913-
subprocess.check_call(["git", "push", "origin", "--delete", f"refs/heads/{BRANCH_PREFIX}/braintree"])
907+
# TODO: Configure permissions to use next code
908+
# print(colored(f"Deleting branch {branch} on origin...", "red"))
909+
# subprocess.check_call(["git", "push", "origin", "--delete", branch])
910+
print(colored(f"Branch {branch} on origin should be deleted.", "red"))
914911

915912

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

0 commit comments

Comments
 (0)