Skip to content

Commit a066b44

Browse files
committed
Fix sync-typeshed script
1 parent e1d09d3 commit a066b44

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

misc/sync-typeshed.py

+3-8
Original file line numberDiff line numberDiff line change
@@ -92,12 +92,7 @@ def create_or_update_pull_request(*, title: str, body: str, branch_name: str) ->
9292

9393
with requests.post(
9494
"https://api.github.com/repos/python/mypy/pulls",
95-
json={
96-
"title": title,
97-
"body": body,
98-
"head": f"{fork_owner}:{branch_name}",
99-
"base": "master",
100-
},
95+
json={"title": title, "body": body, "head": f"{fork_owner}:{branch_name}", "base": "main"},
10196
headers=get_github_api_headers(),
10297
) as response:
10398
resp_json = response.json()
@@ -108,7 +103,7 @@ def create_or_update_pull_request(*, title: str, body: str, branch_name: str) ->
108103
# Find the existing PR
109104
with requests.get(
110105
"https://api.github.com/repos/python/mypy/pulls",
111-
params={"state": "open", "head": f"{fork_owner}:{branch_name}", "base": "master"},
106+
params={"state": "open", "head": f"{fork_owner}:{branch_name}", "base": "main"},
112107
headers=get_github_api_headers(),
113108
) as response:
114109
response.raise_for_status()
@@ -158,7 +153,7 @@ def main() -> None:
158153
shutil.copytree(typeshed_patches, tmp_patches)
159154

160155
branch_name = "mypybot/sync-typeshed"
161-
subprocess.run(["git", "checkout", "-B", branch_name, "origin/master"], check=True)
156+
subprocess.run(["git", "checkout", "-B", branch_name, "origin/main"], check=True)
162157

163158
# Copy the stashed patches back
164159
shutil.rmtree(typeshed_patches, ignore_errors=True)

0 commit comments

Comments
 (0)