{"id":13608005,"url":"https://github.com/bitExpert/captainhook-infection","last_synced_at":"2025-04-12T14:31:42.221Z","repository":{"id":42082372,"uuid":"334445372","full_name":"bitExpert/captainhook-infection","owner":"bitExpert","description":"Captain Hook Plugin to run InfectionPHP only against the changed files of a commit","archived":false,"fork":false,"pushed_at":"2024-04-06T09:09:40.000Z","size":103,"stargazers_count":10,"open_issues_count":0,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-27T20:44:58.027Z","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":"2021-01-30T15:28:37.000Z","updated_at":"2025-02-05T19:06:59.000Z","dependencies_parsed_at":"2024-06-20T00:07:12.440Z","dependency_job_id":null,"html_url":"https://github.com/bitExpert/captainhook-infection","commit_stats":{"total_commits":37,"total_committers":2,"mean_commits":18.5,"dds":0.05405405405405406,"last_synced_commit":"3aa93f6aeb4130d9afc6503b99e93f11a22f79f4"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitExpert%2Fcaptainhook-infection","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitExpert%2Fcaptainhook-infection/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitExpert%2Fcaptainhook-infection/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitExpert%2Fcaptainhook-infection/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bitExpert","download_url":"https://codeload.github.com/bitExpert/captainhook-infection/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248581206,"owners_count":21128123,"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-08-01T19:01:23.487Z","updated_at":"2025-04-12T14:31:41.566Z","avatar_url":"https://github.com/bitExpert.png","language":"PHP","funding_links":[],"categories":["PHP"],"sub_categories":[],"readme":"# bitexpert/captainhook-infection\n\nThis package provides an action for [Captain Hook](https://github.com/CaptainHookPhp/captainhook) \nwhich will invoke [InfectionPHP](https://infection.github.io) for all changed files of a commit. Running Infection only \nagainst the changed files will result in a faster execution of Infection which is ideal when running it as a pre-commit hook.\n\n[![Build Status](https://github.com/bitExpert/captainhook-infection/workflows/ci/badge.svg?branch=master)](https://github.com/bitExpert/captainhook-infection/actions)\n[![Coverage Status](https://coveralls.io/repos/github/bitExpert/captainhook-infection/badge.svg?branch=master)](https://coveralls.io/github/bitExpert/captainhook-infection?branch=master)\n[![Mastodon Follow](https://img.shields.io/mastodon/follow/109408681246972700?domain=https://rheinneckar.social)](https://rheinneckar.social/@bitexpert)\n\n## Installation\n\nThe preferred way of installing `bitexpert/captainhook-infection` is through Composer.\nYou can add `bitexpert/captainhook-infection` as a dev dependency, as follows:\n\n```\ncomposer.phar require --dev bitexpert/captainhook-infection\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\\\\Infection\\\\InfectionAction\"\n      }\n    ]\n  }\n}\n```\nBy default, the action will invoke `./vendor/bin/infection` as a command. If you need to customize the path, e.g. because\nyou installed the .phar distribution you can do so by passing a `infection` configuration option to the action.\n\n```\n{\n  \"pre-commit\": {\n    \"enabled\": true,\n    \"actions\": [\n      {\n        \"action\": \"\\\\bitExpert\\\\CaptainHook\\\\Infection\\\\InfectionAction\",\n        \"options\": {\n            \"infection\": \"php infection.phar\"\n        }\n      }\n    ]\n  }\n}\n```\n\nTo pass additional parameters to Infection, e.g. to define the number of threads used by Infection, supply an args array\noption like this:\n\n```\n{\n  \"pre-commit\": {\n    \"enabled\": true,\n    \"actions\": [\n      {\n        \"action\": \"\\\\bitExpert\\\\CaptainHook\\\\Infection\\\\InfectionAction\",\n        \"options\": {\n            \"args\": [\n                \"-j4\"\n            ]\n        }\n      }\n    ]\n  }\n}\n```\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 Infection Action is released under the Apache 2.0 license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FbitExpert%2Fcaptainhook-infection","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FbitExpert%2Fcaptainhook-infection","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FbitExpert%2Fcaptainhook-infection/lists"}