mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 04:34:28 +08:00
'master' branch was updated to 'main' (#9045)
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user