|
1 | | -import yaml |
2 | 1 | import os |
3 | 2 | import traceback |
4 | | -import tempfile |
5 | | -import shutil |
6 | 3 |
|
7 | | -from datetime import datetime |
8 | 4 | from subprocess import Popen, PIPE |
9 | 5 | from pathlib import Path |
10 | 6 | from typing import Optional, Union |
11 | | -from crowdin_api import CrowdinClient # type: ignore |
12 | 7 | from github import Github, Auth |
13 | 8 | from dotenv import load_dotenv |
14 | 9 |
|
@@ -145,12 +140,17 @@ def clean_up_branches( |
145 | 140 | g = Github(auth=auth) |
146 | 141 | branches = g.get_repo(translations_repo).get_branches() |
147 | 142 | branch_names = [branch.name for branch in branches] |
148 | | - branch_names.remove("main") |
| 143 | + branch_names.remove("main") |
149 | 144 | for branch in branch_names: |
150 | | - if branch.startswith(("content-sync-", "l10n_main", "add/translators-file", "add/status-file")): |
| 145 | + if branch.startswith( |
| 146 | + ("content-sync-", "l10n_main", "add/translators-file", "add/status-file") |
| 147 | + ): |
151 | 148 | print(f"### Deleting branch {branch}") |
152 | 149 | run(["git", "branch", "-d", branch], cwd=base_translations_path) |
153 | | - run(["git", "push", "origin", "--delete", branch], cwd=base_translations_path) |
| 150 | + run( |
| 151 | + ["git", "push", "origin", "--delete", branch], |
| 152 | + cwd=base_translations_path, |
| 153 | + ) |
154 | 154 |
|
155 | 155 |
|
156 | 156 | def main() -> None: |
|
0 commit comments