{"id":22444933,"url":"https://github.com/gimmyxd/check-ahead","last_synced_at":"2025-10-24T02:00:14.636Z","repository":{"id":62555527,"uuid":"214892138","full_name":"gimmyxd/check-ahead","owner":"gimmyxd","description":"Create consistent and transparent rules for checking commit messages","archived":false,"fork":false,"pushed_at":"2020-01-16T21:29:06.000Z","size":51,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-18T11:55:20.554Z","etag":null,"topics":["ruby"],"latest_commit_sha":null,"homepage":"","language":"Ruby","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/gimmyxd.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-10-13T20:52:37.000Z","updated_at":"2020-04-25T12:57:25.000Z","dependencies_parsed_at":"2022-11-03T05:31:02.446Z","dependency_job_id":null,"html_url":"https://github.com/gimmyxd/check-ahead","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/gimmyxd/check-ahead","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gimmyxd%2Fcheck-ahead","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gimmyxd%2Fcheck-ahead/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gimmyxd%2Fcheck-ahead/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gimmyxd%2Fcheck-ahead/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gimmyxd","download_url":"https://codeload.github.com/gimmyxd/check-ahead/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gimmyxd%2Fcheck-ahead/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266808004,"owners_count":23987436,"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-07-24T02:00:09.469Z","response_time":99,"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":["ruby"],"created_at":"2024-12-06T03:10:59.582Z","updated_at":"2025-10-24T02:00:09.526Z","avatar_url":"https://github.com/gimmyxd.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# check-ahead ![badge](https://action-badges.now.sh/gimmyxd/check-ahead)\n\nHelps you create consistent and transparent rules for checking commit messages.\n\n## Rake Tasks\n\n`check-ahead:commits` - checks the commits against defined rules\n\n`check-ahead:generate_rules` - generate rules from input\n\n**check-ahead** uses your **CONTRIBUTING.md** file\n\n```\n### Commit Message\nAccepted commits messages:\n\u003ccommits\u003e\n\n* PA-\\\u003cdigits\u003e\n* maint\n* docs\n\u003c/commits\u003e\n```\n\nThe accepted content is defined between `\u003ccommits\u003e\u003c/commits\u003e` tag and `\u003cdigits\u003e` will be translated to the correspunding regex: `d+`.\n\nCheck [example CONTRIBUTING.md](spec/fixtures/CONTRIBUTING.md)\n\nThis will be used by `check-ahead:commits` which allows only commit messages that match `(PA-\\d+|maint|docs)`\n\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'check-ahead'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install check-ahead\n\n## Usage\n### CLI\n```ruby\nCLI - based on dry-cli\n - check-ahead --help # available commands\n - check-ahead command --help # help for specicif commands\n\nImplemented commands:\n - check-ahead check_commits\n - check-ahead generate_rules TAGS\n```\n### Tasks\n```ruby\n# usually in your Rakefile\n\nrequire 'check-ahead'\nCheckAhead.load_tasks # loads rake task on demand\n\n# alternative loading\nrequire 'check-ahead'\ninclude CheckAhead # loads rake task on project initialization\n```\n\n## Configuration\n\nThe gem supports configuration for: commit\\_range, CONTRIBUTING.md path, base_tags\n\nExample:\n\n```ruby\n# inside your ruby project\n\nCheckAhead.configure do |config|\n  config.commit_range = 'master..HEAD'\n  config.contributing_md = \"/docs/CONTRIBUTING.md\"\n  config.base_tags = [revert]\n  config.max_length = 100\n  config.checking_max_length = true\nend\n```\n\nor **ENVIRONMENT** variables:\n\n```ruby\nENV['BASE_TAGS']\nENV['CONTRIBUTING_MD']\nENV['COMMIT_RANGE']\nENV['MAX_LENGTH']\nENV['CHECK_MAX_LENGTH']\n```\n\nDefaults:\n\n```ruby\nbase_tags = %w[revert merge]\ncontributing_md = File.join('project_root/CONTRIBUTING.md')\ncommit_range = 'master..HEAD'\nmax_length = 50\ncheck_max_length = false\n```\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.\n\nTo install this gem onto your local machine, run `bundle exec rake install`.\n\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/gimmyxd/check-ahead. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n\n## Code of Conduct\n\nEveryone interacting in the CheckAhead project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/gimmyxd/check-ahead/blob/master/CODE_OF_CONDUCT.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgimmyxd%2Fcheck-ahead","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgimmyxd%2Fcheck-ahead","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgimmyxd%2Fcheck-ahead/lists"}