Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Apr 14, 2022
1 parent fe52652 commit 0512ef3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
1 change: 0 additions & 1 deletion src/oca_github_bot/manifest.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,6 @@ def user_can_push(gh, org, repo, username, addons_dir, target_branch):
if target_branch in other_branches:
other_branches.remove(target_branch)


return is_maintainer_other_branches(
org, repo, username, modified_addons, other_branches
)
Expand Down
9 changes: 7 additions & 2 deletions tests/test_manifest.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,11 @@ def test_is_maintainer(tmp_path):
assert not is_maintainer("u2", [addon1, addon2, addon3])
assert not is_maintainer("u1", [tmp_path / "not_an_addon"])


def test_is_maintainer_other_branches():
assert is_maintainer_other_branches("OCA", "mis-builder", "sbidoul", {"mis_builder"}, ["12.0"])
assert not is_maintainer_other_branches("OCA", "mis-builder", "fpdoo", {"mis_builder"}, ["12.0"])
assert is_maintainer_other_branches(
"OCA", "mis-builder", "sbidoul", {"mis_builder"}, ["12.0"]
)
assert not is_maintainer_other_branches(
"OCA", "mis-builder", "fpdoo", {"mis_builder"}, ["12.0"]
)

0 comments on commit 0512ef3

Please sign in to comment.