{"id":13684540,"url":"https://github.com/AckeeCZ/danger-kotlin-commit-lint","last_synced_at":"2025-04-30T21:30:49.194Z","repository":{"id":57732234,"uuid":"276617694","full_name":"AckeeCZ/danger-kotlin-commit-lint","owner":"AckeeCZ","description":"Danger Kotlin Plugin for linting commit messages in PRs/MRs","archived":false,"fork":false,"pushed_at":"2021-03-20T05:45:33.000Z","size":80,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-08-03T14:07:45.212Z","etag":null,"topics":["commitlint","danger","danger-kotlin","gitmoji","kotlin"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","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/AckeeCZ.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":null,"security":null,"support":null}},"created_at":"2020-07-02T10:32:21.000Z","updated_at":"2021-03-20T07:07:44.000Z","dependencies_parsed_at":"2022-08-28T07:50:51.080Z","dependency_job_id":null,"html_url":"https://github.com/AckeeCZ/danger-kotlin-commit-lint","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AckeeCZ%2Fdanger-kotlin-commit-lint","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AckeeCZ%2Fdanger-kotlin-commit-lint/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AckeeCZ%2Fdanger-kotlin-commit-lint/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AckeeCZ%2Fdanger-kotlin-commit-lint/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AckeeCZ","download_url":"https://codeload.github.com/AckeeCZ/danger-kotlin-commit-lint/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223974602,"owners_count":17234685,"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":["commitlint","danger","danger-kotlin","gitmoji","kotlin"],"created_at":"2024-08-02T14:00:34.636Z","updated_at":"2024-11-12T05:32:23.498Z","avatar_url":"https://github.com/AckeeCZ.png","language":"Kotlin","funding_links":[],"categories":["Plugins"],"sub_categories":["Kotlin (danger-kotlin)"],"readme":"[ ![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.github.ackeecz/danger-kotlin-commit-lint/badge.svg)](https://maven-badges.herokuapp.com/maven-central/io.github.ackeecz/danger-kotlin-commit-lint)\n\n# danger-kotlin commit lint plugin\n\nThis is a plugin for [danger-kotlin](https://github.com/danger/kotlin) that checks if commit messages align with\nrecommendations specified eg. [here](https://chris.beams.io/posts/git-commit/)\n\n## Installation\n\nPut\n\n```kotlin\n@file:DependsOn(\"io.github.ackeecz:danger-kotlin-commit-lint:x.y.z\")\n```\n\nto the top of your Dangerfile\n\n## Usage\n\nThere is a single method `CommitLintPlugin.check` that will perform validations on the commits.\n\nDue to a design of danger-kotlin plugin SDK it does not have access to commits directly and for that reason you need to\npass messages to the plugin manually.\n\n```kotlin\nregister CommitLintPlugin\n\n    danger(args) {\n        CommitLintPlugin.check(commits = git.commits.map { gitCommit -\u003e\n            Commit(CommitMessage.fromRawMessage(gitCommit.message), gitCommit.sha ?: \"\")\n        })\n    }\n```\n\n### Rules specification\n\nYou can enable only some rules by passing them to the `check` function. By default, there are these rules:\n\n| Name | Description\n|------|------------|\n| SUBJECT_LENGTH | Length of the subject is less than 50 characters |\n| BODY_LENGTH | Length of the body is less than 72 characters |\n| SUBJECT_BODY_NEW_LINE | Subject and body is separated with newline |\n| SUBJECT_CAPITALIZE | Subject should start with capital letter |\n| SUBJECT_MULTIPLE_WORDS | Subject have more than one word |\n| SUBJECT_ENDS_WITH_PERIOD | Subject does not ends with a period |\n\nIf you want to disable some rules you can do\n\n```kotlin\nCommitLintPlugin.check(commits, Rule.values().toList() - Rule.SUBJECT_CAPITALIZE)\n```\n\n### GitMoji first\n\n[GitMoji](https://gitmoji.carloscuesta.me/) characters are skipped in the beginning for `SUBJECT_CAPITALIZE`\nand `SUBJECT_MULTIPLE_WORDS` rules.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAckeeCZ%2Fdanger-kotlin-commit-lint","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FAckeeCZ%2Fdanger-kotlin-commit-lint","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAckeeCZ%2Fdanger-kotlin-commit-lint/lists"}