{"id":15685350,"url":"https://github.com/zahorniak/pre-commit-circleci","last_synced_at":"2025-05-07T17:01:52.544Z","repository":{"id":41833728,"uuid":"242990655","full_name":"zahorniak/pre-commit-circleci","owner":"zahorniak","description":"pre-commit git hooks to validate CircleCI configuration","archived":false,"fork":false,"pushed_at":"2025-04-28T15:15:50.000Z","size":22,"stargazers_count":9,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-03T04:15:02.762Z","etag":null,"topics":["circleci","circleci-cli","pre-commit","pre-commit-hook"],"latest_commit_sha":null,"homepage":"","language":"Python","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/zahorniak.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":"CODEOWNERS","security":null,"support":null}},"created_at":"2020-02-25T12:08:38.000Z","updated_at":"2025-04-28T15:15:51.000Z","dependencies_parsed_at":"2023-01-21T21:00:30.253Z","dependency_job_id":null,"html_url":"https://github.com/zahorniak/pre-commit-circleci","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zahorniak%2Fpre-commit-circleci","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zahorniak%2Fpre-commit-circleci/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zahorniak%2Fpre-commit-circleci/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zahorniak%2Fpre-commit-circleci/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zahorniak","download_url":"https://codeload.github.com/zahorniak/pre-commit-circleci/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252922018,"owners_count":21825632,"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":["circleci","circleci-cli","pre-commit","pre-commit-hook"],"created_at":"2024-10-03T17:24:55.981Z","updated_at":"2025-05-07T17:01:52.499Z","avatar_url":"https://github.com/zahorniak.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Overview\n\n[![GitHub release (latest by date)](https://img.shields.io/github/v/release/zahorniak/pre-commit-circleci?label=latest%20release)](https://github.com/zahorniak/pre-commit-circleci/releases/)\n[![GitHub Release Date - Published_At](https://img.shields.io/github/release-date/zahorniak/pre-commit-circleci)](https://github.com/zahorniak/pre-commit-circleci/releases/)\n\n[![issues - pre-commit-circleci](https://img.shields.io/github/issues/zahorniak/pre-commit-circleci)](https://github.com/zahorniak/pre-commit-circleci/issues)\n[![GitHub pull requests](https://img.shields.io/github/issues-pr/zahorniak/pre-commit-circleci)](https://github.com/zahorniak/pre-commit-circleci/pulls)\n\n# Usage\n\n## 1. Install dependencies\n\n- [`pre-commit`](https://pre-commit.com/#install)\n- [`circleci-cli`](https://circleci.com/docs/2.0/local-cli/#installation)\n\n## 2. Create config file _.pre-commit-config.yaml_ with content:\n\n- For CircleCI config validation :\n\n```bash\n$ cat .pre-commit-config.yaml\n- repo: https://github.com/zahorniak/pre-commit-circleci.git\n  rev: v1.1.0 # Ensure this is the latest tag, comparing to the Releases tab\n  hooks:\n    - id: circleci_validate\n```\n\n- For CircleCI config processing test :\n\n```bash\n$ cat .pre-commit-config.yaml\n- repo: https://github.com/zahorniak/pre-commit-circleci.git\n  rev: v1.1.0 # Ensure this is the latest tag, comparing to the Releases tab\n  hooks:\n    - id: circleci_process\n```\n\nIf you wish to pass additional args to circleci_validate or circleci_process,\nyou can specify them in the config. See `circleci config validate --help` or\n`circleci config process --help` for accepted args. You must use the form\n`--arg=value`, not `--arg value`.\n\nFor example, to set an org-slug:\n\n```bash\n$ cat .pre-commit-config.yaml\n- repo: https://github.com/zahorniak/pre-commit-circleci.git\n  rev: v1.1.0 # Ensure this is the latest tag, comparing to the Releases tab\n  hooks:\n    - id: circleci_validate\n      args:\n        - --org-slug=my/organization\n```\n\nOr specify a custom config file:\n\n```bash\n$ cat .pre-commit-config.yaml\n- repo: https://github.com/zahorniak/pre-commit-circleci.git\n  rev: v1.1.0\n  hooks:\n    - id: circleci_validate\n      args:\n        - .circleci/continue_config.yml\n```\n\nThe CircleCI process hook allow passing multiple configuration files.\n\nFor example :\n\n```bash\n$ cat .pre-commit-config.yaml\n- repo: https://github.com/zahorniak/pre-commit-circleci.git\n  rev: v1.1.0\n  hooks:\n    - id: circleci_process\n      args:\n        - '--pipeline-parameters={\"foo\": \"bar\"}'\n        - .circleci/config-1.yml\n        - .circleci/config-2.yml\n```\n\n## 3. Install hook\n\n```bash\n$ pre-commit install\npre-commit installed at .git/hooks/pre-commit\n```\n\n## 4. Commit code\n\n```bash\n$ git commit -m \"add circleci hook\"\nValidate CircleCI config.................................................Passed\nProcess CircleCI configuration...........................................Passed\n[branchname 1111111] add circleci hook\n 1 file changed, 5 insertions(+), 1 deletion(-)\n```\n\n## How hook works\n\n| Hook                | Description                                                                  |\n| ------------------- | ---------------------------------------------------------------------------- |\n| `circleci_validate` | Validates CircleCI configuration using command `circleci config validate`    |\n| `circleci_process`  | Process the CircleCI configuration(s) using command`circleci config process` |\n\n### Run hook manually\n\n```bash\n$ pre-commit run -a\nValidate CircleCI config.................................................Passed\nProcess CircleCI configuration...........................................Passed\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzahorniak%2Fpre-commit-circleci","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzahorniak%2Fpre-commit-circleci","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzahorniak%2Fpre-commit-circleci/lists"}