Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: repo-helper/repo-helper-bot
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: ce25477051e2b33749e25ba6a581df5040ba1e54
Choose a base ref
..
head repository: repo-helper/repo-helper-bot
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 77189b87df605ec515b0cb465ac411cb22febaff
Choose a head ref
Showing with 20 additions and 22 deletions.
  1. +2 −2 .pre-commit-config.yaml
  2. +2 −1 pyproject.toml
  3. +1 −0 repo_helper.yml
  4. +2 −2 repo_helper_bot/updater.py
  5. +4 −4 requirements.txt
  6. +9 −13 tox.ini
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -13,7 +13,7 @@ repos:
- id: reformat-pyproject

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
rev: v5.0.0
hooks:
- id: check-added-large-files
- id: check-ast
@@ -62,7 +62,7 @@ repos:
- id: rst-inline-touching-normal

- repo: https://github.com/asottile/pyupgrade
rev: v3.16.0
rev: v3.17.0
hooks:
- id: pyupgrade
args:
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[build-system]
requires = [ "setuptools!=61.*,>=40.6.0", "wheel>=0.34.2",]
requires = [ "setuptools!=61.*,<=67.1.0,>=40.6.0", "wheel>=0.34.2",]
build-backend = "setuptools.build_meta"

[project]
@@ -61,6 +61,7 @@ warn_unused_ignores = true
no_implicit_optional = true
plugins = [ "sqlmypy", "flasksqlamypy",]
show_error_codes = true
incremental = false

[tool.snippet-fmt]
directives = [ "code-block",]
1 change: 1 addition & 0 deletions repo_helper.yml
Original file line number Diff line number Diff line change
@@ -45,3 +45,4 @@ mypy_version: "1.7.1"

tox_unmanaged:
- testenv
- testenv:py312
4 changes: 2 additions & 2 deletions repo_helper_bot/updater.py
Original file line number Diff line number Diff line change
@@ -111,7 +111,7 @@ def update_repository(repository: Dict, recreate: bool = False) -> int:
if recreate:
# Delete any existing branch and create again from master
recreate_branch(repo)
elif f"refs/remotes/origin/{BRANCH_NAME}".encode() in dict(repo.refs):
elif f"refs/remotes/origin/{BRANCH_NAME}".encode("UTF-8") in dict(repo.refs):
checkout_branch(repo)
else:
# Switch to new branch
@@ -266,7 +266,7 @@ def create_branch(repo: Union[dulwich.repo.Repo, PathLike]) -> None:

with open_repo_closing(repo) as repo: # pylint: disable=redefined-argument-from-local
dulwich.porcelain.update_head(repo, b"HEAD", new_branch=BRANCH_NAME.encode("UTF-8"))
repo.refs[f"refs/heads/{BRANCH_NAME}".encode()] = repo.refs[b'refs/heads/master']
repo.refs[f"refs/heads/{BRANCH_NAME}".encode("UTF-8")] = repo.refs[b'refs/heads/master']


def clone(url: str, dest: PathLike) -> Repo:
8 changes: 4 additions & 4 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
git+https://github.com/repo-helper/repo_helper@ef94a9c982f796d0a875ec7442682a4775092314
apeye>=0.7.0
git+https://github.com/repo-helper/repo_helper@e0a01077d8100387a858b3c6a69c252c5db8eb4e
apeye>=1.0.0
click>=7.1.2
domdf-python-tools>=1.8.0
dulwich!=0.20.46,>=0.20.14
domdf-python-tools>=3.2.0
dulwich>=0.22.1
flask>=1.1.2
flask-githubapp>=0.2.0
flask-sqlalchemy>=2.4.4
22 changes: 9 additions & 13 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -5,7 +5,6 @@
# * testenv:.package
# * testenv:py313-dev
# * testenv:py312-dev
# * testenv:py312
# * testenv:docs
# * testenv:build
# * testenv:lint
@@ -35,11 +34,6 @@ setenv =
PYTHONDEVMODE=1
PIP_DISABLE_PIP_VERSION_CHECK=1

[testenv:py312]
setenv =
PYTHONDEVMODE=1
PIP_DISABLE_PIP_VERSION_CHECK=1

[testenv:build]
setenv =
PYTHONDEVMODE=1
@@ -143,6 +137,15 @@ ignore = W002
toplevel = repo_helper_bot
package = repo_helper_bot
[testenv:py312]
setenv =
PYTHONDEVMODE=1
PIP_DISABLE_PIP_VERSION_CHECK=1
GITHUBAPP_ID=1234
GITHUBAPP_SECRET=abc123
GITHUBAPP_KEY=ABCDEFG
RH_BOT_IMPORTCHECK=1
[testenv]
setenv =
PYTHONDEVMODE=1
@@ -171,10 +174,3 @@ exclude_lines =
if typing.TYPE_CHECKING:
if __name__ == .__main__.:
:[\n\s]*\.\.\.
[gh-actions]
python =
3.6: py36, build
3.7: py37, build
3.8: py38, build
3.9: py39, build