{"id":18840615,"url":"https://github.com/bitexpert/captainhook-validateauthor","last_synced_at":"2025-04-14T07:07:49.549Z","repository":{"id":34656506,"uuid":"182316520","full_name":"bitExpert/captainhook-validateauthor","owner":"bitExpert","description":"Captain Hook Plugin to check if commit author is valid (e.g. email in whitelist)","archived":false,"fork":false,"pushed_at":"2025-04-05T14:42:07.000Z","size":265,"stargazers_count":7,"open_issues_count":0,"forks_count":5,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-14T07:07:28.452Z","etag":null,"topics":["captainhook","git","githook","php"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bitExpert.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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-04-19T19:39:12.000Z","updated_at":"2025-04-05T14:40:39.000Z","dependencies_parsed_at":"2024-11-08T02:48:56.312Z","dependency_job_id":"aa3eab38-06ab-4702-aa17-25071b89e646","html_url":"https://github.com/bitExpert/captainhook-validateauthor","commit_stats":{"total_commits":102,"total_committers":5,"mean_commits":20.4,"dds":"0.38235294117647056","last_synced_commit":"ca81c5d24db1275d7be518989b62f52bca0ca260"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitExpert%2Fcaptainhook-validateauthor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitExpert%2Fcaptainhook-validateauthor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitExpert%2Fcaptainhook-validateauthor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitExpert%2Fcaptainhook-validateauthor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bitExpert","download_url":"https://codeload.github.com/bitExpert/captainhook-validateauthor/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248837280,"owners_count":21169374,"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":["captainhook","git","githook","php"],"created_at":"2024-11-08T02:48:19.444Z","updated_at":"2025-04-14T07:07:49.516Z","avatar_url":"https://github.com/bitExpert.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# bitexpert/captainhook-validateauthor\n\nThis package provides an action for [Captain Hook](https://github.com/CaptainHookPhp/captainhook) which will reject a commit when author name or email does not match a regex defined in the `captainhook.json` configuration file. Use this action if you want to make sure that your private email address does not end up in your companies' git repositories.\n\n[![Build Status](https://github.com/bitExpert/captainhook-validateauthor/workflows/ci/badge.svg?branch=master)](https://github.com/bitExpert/captainhook-validateauthor/actions)\n[![Coverage Status](https://coveralls.io/repos/github/bitExpert/captainhook-validateauthor/badge.svg?branch=master)](https://coveralls.io/github/bitExpert/captainhook-validateauthor?branch=master)\n[![Mastodon Follow](https://img.shields.io/mastodon/follow/109408681246972700?domain=https://rheinneckar.social)](https://rheinneckar.social/@bitexpert)\n\n\n## Installation\n\nThe preferred way of installing `bitexpert/captainhook-validateauthor` is through Composer.\nYou can add `bitexpert/captainhook-validateauthor` as a dev dependency, as follows:\n\n```\ncomposer.phar require --dev bitexpert/captainhook-validateauthor\n```\n\n## Usage\n\nAdd the following code to your `captainhook.json` configuration file:\n\n```\n{\n  \"pre-commit\": {\n    \"enabled\": true,\n    \"actions\": [\n      {\n        \"action\": \"\\\\bitExpert\\\\CaptainHook\\\\ValidateAuthor\\\\ValidateAuthorAction\",\n        \"options\": {\n            \"name\": \"/^[A-Za-z0-09]+$/\",\n            \"email\": \"/@example.com$/\"\n        }\n      }\n    ]\n  }\n}\n```\n\n[Captain Hook](https://github.com/CaptainHookPhp/captainhook) will now check\non every commit if author name and email match the defined regex. If not, the commit\nwill be canceled.\n\n## Contribute\n\nPlease feel free to fork and extend existing or add new features and send a pull request with your changes! To establish a consistent code quality, please provide unit tests for all your changes and adapt the documentation.\n\n## Want To Contribute?\n\nIf you feel that you have something to share, then we’d love to have you.\nCheck out [the contributing guide](CONTRIBUTING.md) to find out how, as well as what we expect from you.\n\n## License\n\nCaptain Hook Validate Author Action is released under the Apache 2.0 license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbitexpert%2Fcaptainhook-validateauthor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbitexpert%2Fcaptainhook-validateauthor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbitexpert%2Fcaptainhook-validateauthor/lists"}