{"id":26648093,"url":"https://github.com/zeit/git-hooks","last_synced_at":"2025-03-25T00:01:48.687Z","repository":{"id":53006984,"uuid":"110538605","full_name":"vercel/git-hooks","owner":"vercel","description":"No nonsense Git hook management","archived":false,"fork":false,"pushed_at":"2021-04-10T00:07:53.000Z","size":224,"stargazers_count":203,"open_issues_count":4,"forks_count":10,"subscribers_count":63,"default_branch":"main","last_synced_at":"2024-10-29T17:18:15.349Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vercel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-11-13T11:14:51.000Z","updated_at":"2024-09-17T03:35:20.000Z","dependencies_parsed_at":"2022-09-05T18:40:17.428Z","dependency_job_id":null,"html_url":"https://github.com/vercel/git-hooks","commit_stats":null,"previous_names":["zeit/git-hooks"],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vercel%2Fgit-hooks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vercel%2Fgit-hooks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vercel%2Fgit-hooks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vercel%2Fgit-hooks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vercel","download_url":"https://codeload.github.com/vercel/git-hooks/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245372377,"owners_count":20604491,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-03-25T00:01:20.732Z","updated_at":"2025-03-25T00:01:48.630Z","avatar_url":"https://github.com/vercel.png","language":"JavaScript","readme":"# @vercel/git-hooks\n\nNo nonsense [Git hook](https://git-scm.com/docs/githooks) management.\n\n![](screenshot.png)\n\n## Usage\n\nInstall this module, preferably as a dev-dependency:\n\n```console\nyarn add --dev @vercel/git-hooks\n```\n\nThat's it. You can now use the module in two ways:\n\n```json\n{\n  \"scripts\": {\n    \"git-pre-commit\": \"eslint\"\n  }\n}\n```\n\nThe above will run a single command line, just like running `npm run git-pre-commit` or `yarn git-pre-commit`,\nevery time you `git commit`.\n\nAlternatively, if you'd like to run several scripts in succession upon a hook, you may define a `git` top-level\nproperty and specify an array of scripts to run:\n\n```json\n{\n  \"git\": {\n    \"pre-commit\": \"lint\"\n  }\n}\n```\n\nor\n\n```json\n{\n  \"git\": {\n    \"pre-commit\": [\"lint\", \"test\"]\n  }\n}\n```\n\nNote that any `\"scripts\"` hooks supplant any corresponding `\"git\"` hooks. That is to say, if you define both a\n`{\"scripts\": {\"git-pre-commit\": \"...\"}}` hook and a `{\"git\": {\"pre-commit\": []}}` hook, the hook in `\"scripts\"`\nwill be the only hook that is executed.\n\n## Why? There are hundreds of these.\n\n- No dependencies\n- Supports NPM, Yarn, \u0026lt;insert package manager\u0026gt; - this package will detect and use whatever package manager you installed it with\u0026#42;\n- Tiny footprint - two script files and a couple of symlinks\n- Existing hook / anti-overwrite checks are very reliable since two proprietary scripts are added and all of 'our' hooks are just symlinks\n  to those, so there's virtually no way the uninstall script will mistake a pre-existing hook for its own\n\n\u003e \u0026#42;Caveat: The package manager needs to be npm compliant in terms of environment variables.\n\u003e Worst case, define the environment variables `npm_node_execpath` (node binary) and `npm_execpath` (package manager entry point)\n\u003e as environment variables prior to installing.\n\n# License\nCopyright \u0026copy; 2021 by Vercel, Inc.\n\nReleased under the [MIT License](LICENSE).\n","funding_links":[],"categories":["Packages"],"sub_categories":["Tooling \u0026 dev"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzeit%2Fgit-hooks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzeit%2Fgit-hooks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzeit%2Fgit-hooks/lists"}