@@ -89,12 +89,7 @@ def create_or_update_pull_request(*, title: str, body: str, branch_name: str) ->
89
89
90
90
with requests .post (
91
91
"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" },
98
93
headers = get_github_api_headers (),
99
94
) as response :
100
95
resp_json = response .json ()
@@ -105,7 +100,7 @@ def create_or_update_pull_request(*, title: str, body: str, branch_name: str) ->
105
100
# Find the existing PR
106
101
with requests .get (
107
102
"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 " },
109
104
headers = get_github_api_headers (),
110
105
) as response :
111
106
response .raise_for_status ()
@@ -149,7 +144,7 @@ def main() -> None:
149
144
raise ValueError ("GITHUB_TOKEN environment variable must be set" )
150
145
151
146
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 )
153
148
154
149
if not args .typeshed_dir :
155
150
# Clone typeshed repo if no directory given.
0 commit comments