'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

@@ -1,7 +1,7 @@
name: Run mypy_primer
on:
# Only run on PR, since we diff against master
# Only run on PR, since we diff against main
pull_request:
paths:
- 'stdlib/**'
@@ -41,9 +41,9 @@ jobs:
MYPY_VERSION=$(grep mypy== requirements-tests.txt | cut -d = -f 3)
echo "new commit"
git rev-list --format=%s --max-count=1 $GITHUB_SHA
git checkout -b upstream_master origin/master
git checkout -b upstream_main origin/main
echo "base commit"
git rev-list --format=%s --max-count=1 upstream_master
git rev-list --format=%s --max-count=1 upstream_main
echo ''
cd ..
# fail action if exit code isn't zero or one
@@ -51,7 +51,7 @@ jobs:
mypy_primer \
--new v${MYPY_VERSION} --old v${MYPY_VERSION} \
--custom-typeshed-repo typeshed_to_test \
--new-typeshed $GITHUB_SHA --old-typeshed upstream_master \
--new-typeshed $GITHUB_SHA --old-typeshed upstream_main \
--num-shards 4 --shard-index ${{ matrix.shard-index }} \
--debug \
--output concise \

View File

@@ -2,7 +2,7 @@
[![Tests](https://github.com/python/typeshed/actions/workflows/tests.yml/badge.svg)](https://github.com/python/typeshed/actions/workflows/tests.yml)
[![Chat at https://gitter.im/python/typing](https://badges.gitter.im/python/typing.svg)](https://gitter.im/python/typing?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![Pull Requests Welcome](https://img.shields.io/badge/pull%20requests-welcome-brightgreen.svg)](https://github.com/python/typeshed/blob/master/CONTRIBUTING.md)
[![Pull Requests Welcome](https://img.shields.io/badge/pull%20requests-welcome-brightgreen.svg)](https://github.com/python/typeshed/blob/main/CONTRIBUTING.md)
## About
@@ -45,7 +45,7 @@ details, see the documentation for your type checker.
typeshed includes a package `_typeshed` as part of the standard library.
This package and its submodules contains utility types, but is not
available at runtime. For more information about how to use this package,
[see the `stdlib/_typeshed` directory](https://github.com/python/typeshed/tree/master/stdlib/_typeshed).
[see the `stdlib/_typeshed` directory](https://github.com/python/typeshed/tree/main/stdlib/_typeshed).
## Discussion

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)