adithyabsk: @asottile let me know if you have any other comments
diff --git a/pre_commit_mirror_maker/all/.pre-commit-hooks.yaml b/pre_commit_mirror_maker/all/.pre-commit-hooks.yaml
index 73d2e79..a582766 100644
--- a/pre_commit_mirror_maker/all/.pre-commit-hooks.yaml
+++ b/pre_commit_mirror_maker/all/.pre-commit-hooks.yaml
@@ -5,4 +5,5 @@
     '{match_key}': {match_val}
     args: {args}
     require_serial: {require_serial}
+    pass_filenames: {pass_filenames}
     additional_dependencies: {additional_dependencies}
diff --git a/pre_commit_mirror_maker/main.py b/pre_commit_mirror_maker/main.py
index 8accead..f44fc0d 100644
--- a/pre_commit_mirror_maker/main.py
+++ b/pre_commit_mirror_maker/main.py
@@ -65,6 +65,11 @@ def main(argv: Optional[Sequence[str]] = None) -> int:
         '--require-serial', action='store_true',
         help='Set `require_serial: true` for the hook',
     )
+    parser.add_argument(
+        '--pass-filenames', action='store_true',
+        help='Set `pass_filenames: true` for the hook',
+    )
+
     args = parser.parse_args(argv)
 
     make_repo(
@@ -76,6 +81,7 @@ def main(argv: Optional[Sequence[str]] = None) -> int:
         match_val=f'[{args.types}]' if args.types else args.files_regex,
         args=json.dumps(split_by_commas(args.args)),
         require_serial=json.dumps(args.require_serial),
+        pass_filenames=json.dumps(args.pass_filenames),
     )
     return 0
 

How to setup release to include config attributes
It seems that the script overwrites the yaml confile by default (instead of updating it). If I need to maintain a config param such as `pass_filenames: false`. How would I go about doing that?

The repo in question: https://github.com/adithyabsk/mirrors-brakeman
diff --git a/tests/main_test.py b/tests/main_test.py
index 8f818cf..a577057 100644
--- a/tests/main_test.py
+++ b/tests/main_test.py
@@ -39,7 +39,7 @@ def test_main_passes_args(mock_make_repo):
         '.',
         language='ruby', name='scss-lint', entry='scss-lint-entry',
         match_key='files', match_val=r'\.scss$', args='[]',
-        require_serial='false',
+        require_serial='false', pass_filenames='false',
     )
 
 
diff --git a/tests/make_repo_test.py b/tests/make_repo_test.py
index 773ba9b..0543ef6 100644
--- a/tests/make_repo_test.py
+++ b/tests/make_repo_test.py
@@ -66,6 +66,7 @@ def test_commit_version(in_git_dir):
         version='0.24.1', language='ruby', name='scss-lint', entry='scss-lint',
         match_key='files', match_val=r'\.scss$', args='[]',
         additional_dependencies='[]', require_serial='false',
+        pass_filenames='false',
     )
 
     # Assert that our things got copied over
@@ -86,6 +87,7 @@ def test_arguments(in_git_dir):
         version='0.6.2', language='python', name='yapf', entry='yapf',
         match_key='files', match_val=r'\.py$', args='["-i"]',
         additional_dependencies='["scikit-learn"]', require_serial='false',
+        pass_filenames='false',
     )
     contents = in_git_dir.join('.pre-commit-hooks.yaml').read()
     assert yaml.safe_load(contents) == [{
@@ -96,6 +98,7 @@ def test_arguments(in_git_dir):
         'files': r'\.py$',
         'args': ['-i'],
         'require_serial': False,
+        'pass_filenames': False,
         'additional_dependencies': ['scikit-learn'],
     }]
 
@@ -112,7 +115,7 @@ def test_make_repo_starting_empty(in_git_dir, fake_versions):
         '.',
         language='ruby', name='scss-lint', entry='scss-lint',
         match_key='files', match_val=r'\.scss$', args='[]',
-        require_serial='false',
+        require_serial='false', pass_filenames='false',
     )
 
     # Assert that our things got copied over
@@ -144,7 +147,7 @@ def test_make_repo_starting_at_version(in_git_dir, fake_versions):
         '.',
         language='ruby', name='scss-lint', entry='scss-lint',
         match_key='files', match_val=r'\.scss$', args='[]',
-        require_serial='false',
+        require_serial='false', pass_filenames='false',
     )
 
     assert not in_git_dir.join('hooks.yaml').exists()
@@ -164,7 +167,7 @@ def test_ruby_integration(in_git_dir):
         '.',
         language='ruby', name='scss-lint', entry='scss-lint',
         match_key='files', match_val=r'\.scss$', args='[]',
-        require_serial='false',
+        require_serial='false', pass_filenames='false',
     )
     # Our files should exist
     assert in_git_dir.join('.version').exists()
@@ -184,7 +187,7 @@ def test_node_integration(in_git_dir):
         '.',
         language='node', name='jshint', entry='jshint',
         match_key='files', match_val=r'\.js$', args='[]',
-        require_serial='false',
+        require_serial='false', pass_filenames='false',
     )
     # Our files should exist
     assert in_git_dir.join('.version').exists()
@@ -204,7 +207,7 @@ def test_python_integration(in_git_dir):
         '.',
         language='python', name='flake8', entry='flake8',
         match_key='files', match_val=r'\.py$', args='[]',
-        require_serial='false',
+        require_serial='false', pass_filenames='false',
     )
     # Our files should exist
     assert in_git_dir.join('.version').exists()
@@ -227,7 +230,7 @@ def test_rust_integration(in_git_dir):
         '.',
         language='rust', name='shellharden', entry='shellharden',
         match_key='types', match_val='shell', args='["--replace"]',
-        require_serial='false',
+        require_serial='false', pass_filenames='false',
     )
     # Our files should exist
     assert in_git_dir.join('.version').exists()

pip install -e .[dev]
parse_log_pytest
requirements.txt
pytest
3.7
requirements-dev.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
certifi @ file:///croot/certifi_1671487769961/work/certifi
cfgv==3.3.1
covdefaults==2.3.0
coverage==7.2.7
distlib==0.3.9
exceptiongroup==1.2.2
filelock==3.12.2
identify==2.5.24
importlib-metadata==6.7.0
iniconfig==2.0.0
nodeenv==1.9.1
packaging==24.0
platformdirs==4.0.0
pluggy==1.2.0
pre-commit==2.21.0
-e git+https://github.com/pre-commit/pre-commit-mirror-maker.git@1c5b45349407f930f1c238b96864d851b0e68d7d#egg=pre_commit_mirror_maker
pytest==7.4.4
pytest-env==1.0.1
PyYAML==6.0.1
tomli==2.0.1
typing_extensions==4.7.1
virtualenv==20.26.6
zipp==3.15.0

name: pre-commit-mirror-maker
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - certifi=2022.12.7=py37h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.4.4=h6a678d5_1
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=1.1.1w=h7f8727e_0
  - pip=22.3.1=py37h06a4308_0
  - python=3.7.16=h7a1cb2a_0
  - readline=8.2=h5eee18b_0
  - setuptools=65.6.3=py37h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - wheel=0.38.4=py37h06a4308_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - cfgv==3.3.1
      - covdefaults==2.3.0
      - coverage==7.2.7
      - distlib==0.3.9
      - exceptiongroup==1.2.2
      - filelock==3.12.2
      - identify==2.5.24
      - importlib-metadata==6.7.0
      - iniconfig==2.0.0
      - nodeenv==1.9.1
      - packaging==24.0
      - platformdirs==4.0.0
      - pluggy==1.2.0
      - pre-commit==2.21.0
      - pytest==7.4.4
      - pytest-env==1.0.1
      - pyyaml==6.0.1
      - tomli==2.0.1
      - typing-extensions==4.7.1
      - virtualenv==20.26.6
      - zipp==3.15.0
prefix: /opt/conda/envs/pre-commit-mirror-maker

tests/main_test.py::test_main_passes_args tests/make_repo_test.py::test_arguments
tests/make_repo_test.py::test_node_integration
tests/main_test.py::test_split_by_commas[-expected0] tests/main_test.py::test_split_by_commas[None-expected1] tests/main_test.py::test_split_by_commas[onearg-expected2] tests/main_test.py::test_split_by_commas[two,args-expected3] tests/main_test.py::test_split_by_commas[arg,with\\,escaped-expected4] tests/main_test.py::test_split_by_commas[-i,--ignore=E265\\,E501-expected5] tests/main_test.py::test_main_defaults_entry_to_package_name tests/main_test.py::test_main_with_args tests/make_repo_test.py::test_format_files tests/make_repo_test.py::test_format_files_skips_pyc tests/make_repo_test.py::test_skips_directories tests/make_repo_test.py::test_commit_version tests/make_repo_test.py::test_make_repo_starting_empty tests/make_repo_test.py::test_make_repo_starting_at_version tests/make_repo_test.py::test_ruby_integration tests/make_repo_test.py::test_python_integration tests/make_repo_test.py::test_rust_integration
pre_commit_mirror_maker/main.py pre_commit_mirror_maker/all/.pre-commit-hooks.yaml
pre_commit_mirror_maker/main.py pre_commit_mirror_maker/all/.pre-commit-hooks.yaml