{"id":20949862,"url":"https://github.com/team23/pre-commit-magento2","last_synced_at":"2026-04-27T10:32:19.148Z","repository":{"id":220485311,"uuid":"704504071","full_name":"team23/pre-commit-magento2","owner":"team23","description":null,"archived":false,"fork":false,"pushed_at":"2024-02-02T10:58:42.000Z","size":9,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-29T05:50:56.502Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/team23.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2023-10-13T11:58:43.000Z","updated_at":"2024-04-03T09:14:27.000Z","dependencies_parsed_at":"2024-11-19T00:44:24.763Z","dependency_job_id":"f6dc34d0-a09e-4db6-8cf9-8b2c5df37451","html_url":"https://github.com/team23/pre-commit-magento2","commit_stats":null,"previous_names":["team23/pre-commit-magento2"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/team23/pre-commit-magento2","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/team23%2Fpre-commit-magento2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/team23%2Fpre-commit-magento2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/team23%2Fpre-commit-magento2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/team23%2Fpre-commit-magento2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/team23","download_url":"https://codeload.github.com/team23/pre-commit-magento2/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/team23%2Fpre-commit-magento2/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32333196,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-26T23:26:28.701Z","status":"online","status_checked_at":"2026-04-27T02:00:06.769Z","response_time":128,"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":[],"created_at":"2024-11-19T00:44:18.525Z","updated_at":"2026-04-27T10:32:19.104Z","avatar_url":"https://github.com/team23.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pre-Commit-Hooks-Magento2-b5\n\nThese Pre-Commit-Hooks are using the tasks from the taskfiles. These need to be installed/imported/copied in your Magento 2 Project if you do not have them already. Don't forget to source them in your PROJECTDIR/build/Taskfile.\n\nThen create a `.pre-commit-config.yaml` in your project directory (on the same level as your build and web or src directory) with the following content:\n```\n# See https://pre-commit.com for more information\n# See https://pre-commit.com/hooks.html for more hooks\nrepos:\n  - repo: https://github.com/team23/pre-commit-magento2\n    rev: 'v1.0.0'\n    hooks:\n      - id: php-cs\n      - id: php-stan\n      - id: php-md\n      - id: magento-eslint\n\n```\n\nOnce this is set up, the `b5 install` task should install `pre-commit` via brew, if it is not already installed. \n\n## How does it work?\nThe pre-commit hook downloads on the first `git commit` a short installation script. This downloads all given hooks from the `.pre-commit-config.yaml` file and stores them into `~/.cache/pre-commit`. After this it executes all hooks on the staged files depending on the file type that is defined for each hook. If you need to update the hooks, create a merge/pull request with the changes and once these are in the main branch, create a new tag. This tag is the `rev:` version within the config file. If something goes wrong and you need to reset your locally installed pre-commit hooks you can just run `pre-commit clean`. This will delete all hooks in your .cache directory. Each hook will run a bash script from the `pre-commit-hooks` directory. (Just to make it clear again: These scripts are written in a way, that uses your b5 commit tasks. If you do not have these tasks yet, just use the sample tasks from the `taskfiles` directory). You can add more hooks by adding it to the `.pre-commit-hooks.yaml` file and adding a correlating script for it. ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteam23%2Fpre-commit-magento2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fteam23%2Fpre-commit-magento2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteam23%2Fpre-commit-magento2/lists"}