Title: Scoped node packages produce invalid config · Issue #268 · pre-commit/pre-commit-mirror-maker · GitHub
Open Graph Title: Scoped node packages produce invalid config · Issue #268 · pre-commit/pre-commit-mirror-maker
X Title: Scoped node packages produce invalid config · Issue #268 · pre-commit/pre-commit-mirror-maker
Description: I'm trying to set up a mirror for @bugron/validate-dependabot-yaml. I'm running: $ pre-commit-mirror . \ --language node \ --package-name '@bugron/validate-dependabot-yaml' \ --id validate-dependabot-cli \ --entry validate-dependabot-yam...
Open Graph Description: I'm trying to set up a mirror for @bugron/validate-dependabot-yaml. I'm running: $ pre-commit-mirror . \ --language node \ --package-name '@bugron/validate-dependabot-yaml' \ --id validate-dependab...
X Description: I'm trying to set up a mirror for @bugron/validate-dependabot-yaml. I'm running: $ pre-commit-mirror . \ --language node \ --package-name '@bugron/validate-dependabot-yaml' \ --id v...
Opengraph URL: https://github.com/pre-commit/pre-commit-mirror-maker/issues/268
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Scoped node packages produce invalid config","articleBody":"I'm trying to set up a mirror for `@bugron/validate-dependabot-yaml`. I'm running:\n\n```\n$ pre-commit-mirror . \\\n --language node \\\n --package-name '@bugron/validate-dependabot-yaml' \\\n --id validate-dependabot-cli \\\n --entry validate-dependabot-yaml \\\n --files-regex '^(\\.github|config)/dependabot\\.ya?ml$'\n```\n\nThe produced YAML file ends up with `name: @bugron/validate-dependabot-yaml` (no quotes). The problem is `@` (as the first character) is one of YAML's reserved indicators so this produces invalid YAML and the hook can't load.\n\nOne fix is to change `name: {name}` in the `all/.pre-commit-hooks.yaml` to `name: {name!r}`. This is what we do for `description`.\n\nAnother is to use `pyyaml` to dump the file instead of string formatting, but it's more involvd.\n\nWith either fix I verified that the same `pre-commit-mirror` command produces a valid `.pre-commit-hooks.yaml` file with `name: '@bugron/validate-dependabot-yaml'` (with quotes) and I verified that the repo runs with `pre-commit try-repo`.","author":{"url":"https://github.com/mxr","@type":"Person","name":"mxr"},"datePublished":"2026-07-09T01:28:17Z","url":"https://github.com/pre-commit/pre-commit-mirror-maker/issues/268"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:8e208d70-035b-3881-fbd0-118ca34aab86 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CAC8:302FC:106D3B2:160CEF7:6B005E11 |
| html-safe-nonce | 2c5ec8e2cefe5d93487afe9a564482c707ae09ead24c83a3b71015e66ceb5537 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDQUM4OjMwMkZDOjEwNkQzQjI6MTYwQ0VGNzo2QjAwNUUxMSIsInZpc2l0b3JfaWQiOiI3NTM0NTQzNzkwNjYxNDU5NDczIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | c1c01485a5e5ae2dac927ae0b65446803ec9afeb0523974dba65f80404be1f8e |
| hovercard-subject-tag | issue:4842349227 |
| github-keyboard-shortcuts | repository,issues,commits,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/pre-commit/pre-commit-mirror-maker/268/issue_layout |
| twitter:image | https://opengraph.githubassets.com/0cd60a42e050b69552a962ecfbf00e519b9b1b648f341d3aafa80834ef39d7f2/pre-commit/pre-commit-mirror-maker/issues/268 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/0cd60a42e050b69552a962ecfbf00e519b9b1b648f341d3aafa80834ef39d7f2/pre-commit/pre-commit-mirror-maker/issues/268 |
| og:image:alt | I'm trying to set up a mirror for @bugron/validate-dependabot-yaml. I'm running: $ pre-commit-mirror . \ --language node \ --package-name '@bugron/validate-dependabot-yaml' \ --id validate-dependab... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | mxr |
| hostname | github.com |
| expected-hostname | github.com |
| None | 29be975efff6507a5d135de9c7d634cf7ff8f0c55222a64386ab3202209aaf73 |
| turbo-cache-control | no-preview |
| go-import | github.com/pre-commit/pre-commit-mirror-maker git https://github.com/pre-commit/pre-commit-mirror-maker.git |
| octolytics-dimension-user_id | 6943086 |
| octolytics-dimension-user_login | pre-commit |
| octolytics-dimension-repository_id | 20654297 |
| octolytics-dimension-repository_nwo | pre-commit/pre-commit-mirror-maker |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 20654297 |
| octolytics-dimension-repository_network_root_nwo | pre-commit/pre-commit-mirror-maker |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | eacd927ba6112e3b01ba99c762bd699a4a4f5df7 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width