@@ -89,12 +89,7 @@ def create_or_update_pull_request(*, title: str, body: str, branch_name: str) ->
8989
9090 with requests .post (
9191 "https://api.github.com/repos/python/mypy/pulls" ,
92- json = {
93- "title" : title ,
94- "body" : body ,
95- "head" : f"{ fork_owner } :{ branch_name } " ,
96- "base" : "master" ,
97- },
92+ json = {"title" : title , "body" : body , "head" : f"{ fork_owner } :{ branch_name } " , "base" : "main" },
9893 headers = get_github_api_headers (),
9994 ) as response :
10095 resp_json = response .json ()
@@ -105,7 +100,7 @@ def create_or_update_pull_request(*, title: str, body: str, branch_name: str) ->
105100 # Find the existing PR
106101 with requests .get (
107102 "https://api.github.com/repos/python/mypy/pulls" ,
108- params = {"state" : "open" , "head" : f"{ fork_owner } :{ branch_name } " , "base" : "master " },
103+ params = {"state" : "open" , "head" : f"{ fork_owner } :{ branch_name } " , "base" : "main " },
109104 headers = get_github_api_headers (),
110105 ) as response :
111106 response .raise_for_status ()
@@ -149,7 +144,7 @@ def main() -> None:
149144 raise ValueError ("GITHUB_TOKEN environment variable must be set" )
150145
151146 branch_name = "mypybot/sync-typeshed"
152- subprocess .run (["git" , "checkout" , "-B" , branch_name , "origin/master " ], check = True )
147+ subprocess .run (["git" , "checkout" , "-B" , branch_name , "origin/main " ], check = True )
153148
154149 if not args .typeshed_dir :
155150 # Clone typeshed repo if no directory given.
0 commit comments