{"id":16317807,"url":"https://github.com/greeflas/git-hooks","last_synced_at":"2025-03-22T21:31:39.176Z","repository":{"id":190202064,"uuid":"174207773","full_name":"greeflas/git-hooks","owner":"greeflas","description":"Useful scripts for Git Hooks.","archived":false,"fork":false,"pushed_at":"2024-04-11T13:30:45.000Z","size":22,"stargazers_count":13,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-18T14:53:48.630Z","etag":null,"topics":["bash","bash-scripts","git","git-hook","git-hooks"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/greeflas.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-03-06T19:31:58.000Z","updated_at":"2024-04-11T13:27:21.000Z","dependencies_parsed_at":"2023-08-23T16:47:49.555Z","dependency_job_id":"734cb21c-5567-4c54-9433-5401c6abd308","html_url":"https://github.com/greeflas/git-hooks","commit_stats":null,"previous_names":["greeflas/git-hooks"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/greeflas%2Fgit-hooks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/greeflas%2Fgit-hooks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/greeflas%2Fgit-hooks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/greeflas%2Fgit-hooks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/greeflas","download_url":"https://codeload.github.com/greeflas/git-hooks/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245022568,"owners_count":20548560,"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":["bash","bash-scripts","git","git-hook","git-hooks"],"created_at":"2024-10-10T22:09:19.817Z","updated_at":"2025-03-22T21:31:38.609Z","avatar_url":"https://github.com/greeflas.png","language":"Shell","readme":"\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://github.com/greeflas/git-hooks\" target=\"_blank\"\u003e\n        \u003cimg src=\"https://github.com/greeflas/git-hooks/blob/master/docs/logo.png\" height=\"300px\"\u003e\n    \u003c/a\u003e\n    \u003ch1 align=\"center\"\u003eUseful scripts for Git Hooks\u003c/h1\u003e\n\u003c/p\u003e\n\n[![Build Status](https://travis-ci.org/greeflas/git-hooks.svg?branch=master)](https://travis-ci.org/greeflas/git-hooks)\n\n### prepare-commit-msg\n\n* [ticket_number.sh](src/prepare-commit-msg/ticket_number.sh) - this script adds ticket number to commits\nin feature branch. It gets ticket number from branch name. Branch name should have following format `EXAMPLE-305/some_feature`.\n\n    For example if first commit is named `Implements some feature` this script will update it with ticket number and it will look like `EXAMPLE-305 Implements some feature`.\n\n    Also you can set `EACH_COMMIT` variable to `false` if you want add ticket number only for the first commit.\n\n    \u003e Symlink: ln -s ~/tools/git-hooks/src/prepare-commit-msg/ticket_number.sh .git/hooks/prepare-commit-msg\n\n### pre-commit\n\n* [php_cs_fixer.sh](src/pre-commit/php_cs_fixer.sh) - this script runs PHP-CS-Fixer before commit for fixing code style.\n\n    \u003e Symlink: ln -s ~/tools/git-hooks/src/pre-commit/php_cs_fixer.sh .git/hooks/pre-commit\n\n* [phpunit.sh](src/pre-commit/phpunit.sh) - this script runs PHPUnit before commit for running tests.\n\n    \u003e Symlink: ln -s ~/tools/git-hooks/src/pre-commit/phpunit.sh .git/hooks/pre-commit\n\n* [check_working_on_master.sh](src/pre-commit/check_working_on_master.sh) - this script helps to warn if you make commit on the master branch.\n\n    \u003e Symlink: ln -s ~/tools/git-hooks/src/pre-commit/check_working_on_master.sh .git/hooks/pre-commit\n\n### post-merge\n\n* [composer_install.sh](src/post-merge/composer_install.sh) - this script installs composer packages specified in \ncomposer.json or composer.lock (if it presents) file after git pull or git merge.\n\n    \u003e Symlink: ln -s ~/tools/git-hooks/src/post-merge/composer_install.sh .git/hooks/post-merge\n\nInstallation\n------------\n\n1. Pull this repo to some place in your machine\n\n    `$ git clone https://github.com/greeflas/git-hooks.git`\n\n2. Create a symlink for needed script in your project `.git/hooks` directory\n\n    `$ ln -s ~/tools/git-hooks/src/prepare-commit-msg/ticket_number.sh .git/hooks/prepare-commit-msg`\n\nContributing\n------------\n\nFor information about contributing please read [CONTRIBUTING.md](CONTRIBUTING.md).\n\nLicense\n-------\n\n[![license](https://img.shields.io/github/license/greeflas/git-hooks.svg)](LICENSE)\n\nThis project is released under the terms of the BSD-3-Clause [license](LICENSE).\n\nCopyright (c) 2019 - 2024, Volodymyr Kupriienko\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgreeflas%2Fgit-hooks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgreeflas%2Fgit-hooks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgreeflas%2Fgit-hooks/lists"}