{"id":33993302,"url":"https://github.com/phpple/gitwatcher","last_synced_at":"2026-04-21T11:04:46.666Z","repository":{"id":57040752,"uuid":"242526169","full_name":"phpple/gitwatcher","owner":"phpple","description":"A Smart Git Hook Assembly.","archived":false,"fork":false,"pushed_at":"2021-05-08T01:17:37.000Z","size":72,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-26T02:48:31.102Z","etag":null,"topics":["git","hook"],"latest_commit_sha":null,"homepage":null,"language":"PHP","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/phpple.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":"2020-02-23T13:55:01.000Z","updated_at":"2021-05-08T01:17:39.000Z","dependencies_parsed_at":"2022-08-23T22:00:09.404Z","dependency_job_id":null,"html_url":"https://github.com/phpple/gitwatcher","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/phpple/gitwatcher","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phpple%2Fgitwatcher","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phpple%2Fgitwatcher/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phpple%2Fgitwatcher/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phpple%2Fgitwatcher/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/phpple","download_url":"https://codeload.github.com/phpple/gitwatcher/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phpple%2Fgitwatcher/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27701863,"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","status":"online","status_checked_at":"2025-12-13T02:00:09.769Z","response_time":147,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["git","hook"],"created_at":"2025-12-13T07:09:40.143Z","updated_at":"2025-12-13T07:09:40.719Z","avatar_url":"https://github.com/phpple.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"## GitWatcher\n\nGitWatcher is a assembly of git hook script.\n\nIf you want to use it, just add some script in your composer.json file.\n\n```bash\ncomposer require phpple/gitwatcher --dev\n```\n\n```\n\"scripts\": {\n    \"post-autoload-dump\": [\n      \"Phpple\\\\GitWatcher\\\\Composer::postAutoloadDump\"\n    ]\n}\n```\n\n## Watchers\n\nYour can find the watchers in `src/Watcher`\n\n### git_version\n\nCheck whether the git's version greater than the custom version. The default mininum version is 2.2.0.\n\n### committer\n\nCheck the validity of committer's information.For example, the committer's email's extension.\n\n#### example\n```json\n{\n  \"committer\": {\n    \"email_extension\": \"live.com\"\n  }\n}\n```\nInspect will be failed when your local git config about user.email is not end with live.com.\n\n\n### composer\n\nCheck the validity of `composer.json`.\n\n#### example\n\n```json\n{\n  \"composer\": {}\n}\n```\nInspect will be failed when any repository's version of `require` field's is not a constant.\n\n#### Illegal composer.json\n```json\n{\n  \"require\": {\n    \"fideloper/proxy\": \"^4.3\"\n  }\n}\n``` \n\n#### Good composer.json\n```json\n{\n  \"require\": {\n    \"fideloper/proxy\": \"4.3.0\"\n  }\n}\n```\n\n### StandardWatcher\n\nCheck the validity of your code by phpcs.\n\n#### example\n```json\n{\n  \"standard\": {\n    \"phpcs\": \"vendor/bin/phpcs\",\n    \"target\": \"app/,src/\",\n    \"mode\": \"all\",\n    \"options\": {\n      \"standard\": \"{$project.root}assets/rules/phpdefault.xml\",\n      \"colors\": true,\n      \"s\": true\n    }\n  }\n}\n```\n\n* `phpcs`: where the phpcs bin file is\n* `target`: the dir will be checked by phpcs\n* `mode`: [all|update] \n    * `all`:check all the files in `target`\n    * `update`:only check update files in `target`\n* `options`: the options of phpcs\n    * `standard`: `{$project.root}` refer to the root dir of gitwatcher.\n    * `colors`: print texts with color\n    * `s`: print the sniffer of the problem\n    * ... see the help of phpcs\n\n## Custom configure\n\nIf your want to custom the configure, you can add a file(`gitwatcher.json`) in your site root dir. such as\n```json\n{\n  \"@extend\": \"default\",\n  \"standard\": {\n    \"options\": {\n      \"colors\": false\n    }\n  }\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphpple%2Fgitwatcher","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphpple%2Fgitwatcher","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphpple%2Fgitwatcher/lists"}