'master' branch was updated to 'main' (#9045)

This commit is contained in:
Sebastian Rittau
2022-11-01 12:57:57 +01:00
committed by GitHub
parent a7cf6144de
commit 3aaf6b9999
3 changed files with 10 additions and 10 deletions

View File

@@ -480,7 +480,7 @@ async def create_or_update_pull_request(*, title: str, body: str, branch_name: s
async with session.post(
f"https://api.github.com/repos/{TYPESHED_OWNER}/typeshed/pulls",
json={"title": title, "body": body, "head": f"{fork_owner}:{branch_name}", "base": "master"},
json={"title": title, "body": body, "head": f"{fork_owner}:{branch_name}", "base": "main"},
headers=get_github_api_headers(),
) as response:
resp_json = await response.json()
@@ -490,7 +490,7 @@ async def create_or_update_pull_request(*, title: str, body: str, branch_name: s
# Find the existing PR
async with session.get(
f"https://api.github.com/repos/{TYPESHED_OWNER}/typeshed/pulls",
params={"state": "open", "head": f"{fork_owner}:{branch_name}", "base": "master"},
params={"state": "open", "head": f"{fork_owner}:{branch_name}", "base": "main"},
headers=get_github_api_headers(),
) as response:
response.raise_for_status()
@@ -606,7 +606,7 @@ async def suggest_typeshed_update(update: Update, session: aiohttp.ClientSession
title = f"[stubsabot] Bump {update.distribution} to {update.new_version_spec}"
async with _repo_lock:
branch_name = f"{BRANCH_PREFIX}/{normalize(update.distribution)}"
subprocess.check_call(["git", "checkout", "-B", branch_name, "origin/master"])
subprocess.check_call(["git", "checkout", "-B", branch_name, "origin/main"])
with open(update.stub_path / "METADATA.toml", "rb") as f:
meta = tomlkit.load(f)
meta["version"] = update.new_version_spec
@@ -632,7 +632,7 @@ async def suggest_typeshed_obsolete(obsolete: Obsolete, session: aiohttp.ClientS
title = f"[stubsabot] Mark {obsolete.distribution} as obsolete since {obsolete.obsolete_since_version}"
async with _repo_lock:
branch_name = f"{BRANCH_PREFIX}/{normalize(obsolete.distribution)}"
subprocess.check_call(["git", "checkout", "-B", branch_name, "origin/master"])
subprocess.check_call(["git", "checkout", "-B", branch_name, "origin/main"])
with open(obsolete.stub_path / "METADATA.toml", "rb") as f:
meta = tomlkit.load(f)
obs_string = tomlkit.string(obsolete.obsolete_since_version)