{"id":13394618,"url":"https://github.com/ghooks-org/ghooks","last_synced_at":"2025-05-16T08:07:09.369Z","repository":{"id":16508304,"uuid":"19261272","full_name":"ghooks-org/ghooks","owner":"ghooks-org","description":"Simple git hooks","archived":false,"fork":false,"pushed_at":"2023-07-20T12:18:23.000Z","size":946,"stargazers_count":1083,"open_issues_count":32,"forks_count":63,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-05-13T14:21:42.510Z","etag":null,"topics":["ghooks","git","git-hooks","javascript"],"latest_commit_sha":null,"homepage":"","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/ghooks-org.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2014-04-29T02:36:44.000Z","updated_at":"2025-02-08T12:47:35.000Z","dependencies_parsed_at":"2024-01-13T10:42:45.115Z","dependency_job_id":"224d61dc-46fd-414a-b1cd-efb61b0493e5","html_url":"https://github.com/ghooks-org/ghooks","commit_stats":{"total_commits":156,"total_committers":25,"mean_commits":6.24,"dds":0.641025641025641,"last_synced_commit":"569eb3c4a644c3c4a7060c3e77deb988b887e2e6"},"previous_names":["gtramontina/ghooks"],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghooks-org%2Fghooks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghooks-org%2Fghooks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghooks-org%2Fghooks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghooks-org%2Fghooks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ghooks-org","download_url":"https://codeload.github.com/ghooks-org/ghooks/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254493385,"owners_count":22080127,"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":["ghooks","git","git-hooks","javascript"],"created_at":"2024-07-30T17:01:25.699Z","updated_at":"2025-05-16T08:07:04.344Z","avatar_url":"https://github.com/ghooks-org.png","language":"JavaScript","readme":"# ghooks\n\n[![version](https://img.shields.io/npm/v/ghooks.svg?style=flat-square)](http://npm.im/ghooks)\n[![travis build](https://img.shields.io/travis/ghooks-org/ghooks.svg?style=flat-square)](https://travis-ci.org/ghooks-org/ghooks)\n[![AppVeyor](https://img.shields.io/appveyor/ci/gtramontina/ghooks.svg?style=flat-square)](https://ci.appveyor.com/project/gtramontina/ghooks)\n[![codecov coverage](https://img.shields.io/codecov/c/github/ghooks-org/ghooks.svg?style=flat-square)](https://codecov.io/github/ghooks-org/ghooks)\n[![Dependencies status](https://img.shields.io/david/ghooks-org/ghooks.svg?style=flat-square)](https://david-dm.org/ghooks-org/ghooks#info=dependencies)\n[![Dev Dependencies status](https://img.shields.io/david/dev/ghooks-org/ghooks.svg?style=flat-square)](https://david-dm.org/ghooks-org/ghooks#info=devDependencies)\n\n[![MIT License](https://img.shields.io/npm/l/ghooks.svg?style=flat-square)](http://opensource.org/licenses/MIT)\n[![downloads](https://img.shields.io/npm/dm/ghooks.svg?style=flat-square)](http://npm-stat.com/charts.html?package=ghooks\u0026from=2014-04-01)\n[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=flat-square)](https://github.com/semantic-release/semantic-release)\n[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=flat-square)](http://commitizen.github.io/cz-cli/)\n\nSimple git hooks\n\n## Installation\n\n```shell\nnpm install ghooks --save-dev\n```\n\n_It is not advised to install `ghooks` as a production dependency, as it will install git hooks in your production environment as well. Please install it under the `devDependencies` section of your `package.json`._\n\n_Please also note, that it is absolutely **not advised** to install `ghooks` globally. To work as expected, make it a development dependency of your project(s)._\n\n## Setup\n\nAdd a `config.ghooks` entry in your `package.json` and simply specify which git hooks you want and their corresponding commands, like the following:\n\n```json\n{\n  …\n  \"config\": {\n    \"ghooks\": {\n      \"pre-commit\": \"gulp lint\",\n      \"commit-msg\": \"validate-commit-msg\",\n      \"pre-push\": \"make test\",\n      \"post-merge\": \"npm install\",\n      \"post-rewrite\": \"npm install\",\n      …\n    }\n  }\n  …\n}\n```\n\n**Note:** _The hooks' working directory is relative to the git root (where you have your `.git` directory). This means that if your package.json is in a subdirectory of your git repository, you'll need to cd into the directory before running any npm scripts. E.g.:_\n\n```json\n\"pre-commit\": \"cd path/to/folder \u0026\u0026 npm run test\"\n```\n\n## opt-in/out\n\nOne of the last things you want is to raise the barrier to contributing to your open source project. So [Andreas Windt](https://github.com/ta2edchimp) developed the [opt-cli](https://npmjs.com/package/opt-cli) package to allow you to turn your hooks into opt-in/out scripts. See this project's [`package.json`](package.json) for an example of how to do that.\n\n## All [documented](http://git-scm.com/docs/githooks) hooks are available\n\n* applypatch-msg\n* pre-applypatch\n* post-applypatch\n* pre-commit\n* prepare-commit-msg\n* commit-msg\n* post-commit\n* pre-rebase\n* post-checkout\n* post-merge\n* pre-push\n* pre-receive\n* update\n* post-receive\n* post-update\n* pre-auto-gc\n* post-rewrite\n\n## Common Issues\n\n* [Usage with git GUI clients](https://github.com/ghooks-org/ghooks/issues/18) – Thanks to [@JamieMason](https://github.com/JamieMason)\n\n## Credits\n\nThis module is heavily inspired by [__@nlf__](https://github.com/nlf)'s [precommit-hook](https://www.npmjs.org/package/precommit-hook)\n\n## Contributors\n\nHuge thanks to everyone listed [here](https://github.com/ghooks-org/ghooks/graphs/contributors)!\n\n## License\n\nThis software is licensed under the MIT license\n","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fghooks-org%2Fghooks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fghooks-org%2Fghooks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fghooks-org%2Fghooks/lists"}