mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-04-15 01:51:46 +04:00
Add pre-rebase hook support
This commit is contained in:
parent
f2661bfc31
commit
f39154f69f
9 changed files with 114 additions and 0 deletions
|
|
@ -563,6 +563,16 @@ def test_merge_conflict_resolved(cap_out, store, in_merge_conflict):
|
|||
assert msg in printed
|
||||
|
||||
|
||||
def test_rebase(cap_out, store, repo_with_passing_hook):
|
||||
args = run_opts(pre_rebase_upstream='master', pre_rebase_branch='topic')
|
||||
environ: MutableMapping[str, str] = {}
|
||||
ret, printed = _do_run(
|
||||
cap_out, store, repo_with_passing_hook, args, environ,
|
||||
)
|
||||
assert environ['PRE_COMMIT_PRE_REBASE_UPSTREAM'] == 'master'
|
||||
assert environ['PRE_COMMIT_PRE_REBASE_BRANCH'] == 'topic'
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
('hooks', 'expected'),
|
||||
(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue