Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pre_commit_mirror_maker/all/.pre-commit-hooks.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
- id: {id}
name: {name}
name: {name!r}
description: {description!r}
entry: {entry}
language: {language}
Expand Down
27 changes: 27 additions & 0 deletions tests/make_repo_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,33 @@ def test_arguments(in_git_dir):
}]


def test_arguments_name_with_special_chars(in_git_dir):
_commit_version(
'.',
version='1.0.0', language='node',
name='@bugron/validate-dependabot-yaml',
description='', entry='validate-dependabot-yaml',
id='validate-dependabot-cli',
match_key='files',
match_val=r'^(\.github|config)/dependabot\.ya?ml$', args='[]',
additional_dependencies='[]', require_serial='false',
minimum_pre_commit_version='0',
)
contents = in_git_dir.join('.pre-commit-hooks.yaml').read()
assert yaml.safe_load(contents) == [{
'id': 'validate-dependabot-cli',
'name': '@bugron/validate-dependabot-yaml',
'description': '',
'entry': 'validate-dependabot-yaml',
'language': 'node',
'files': r'^(\.github|config)/dependabot\.ya?ml$',
'args': [],
'require_serial': False,
'additional_dependencies': [],
'minimum_pre_commit_version': '0',
}]


@pytest.fixture
def fake_versions():
fns = {'ruby': lambda _: ('0.23.1', '0.24.0', '0.24.1')}
Expand Down
Loading