Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lppedd/idea-conventional-commit
Context and template-based completion for conventional/semantic commits.
https://github.com/lppedd/idea-conventional-commit
conventional-commit idea idea-plugin intellij intellij-plugin semantic semantic-commits
Last synced: about 1 month ago
JSON representation
Context and template-based completion for conventional/semantic commits.
- Host: GitHub
- URL: https://github.com/lppedd/idea-conventional-commit
- Owner: lppedd
- License: mit
- Created: 2019-09-15T23:23:37.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2024-08-10T17:41:25.000Z (3 months ago)
- Last Synced: 2024-09-27T05:22:21.962Z (about 2 months ago)
- Topics: conventional-commit, idea, idea-plugin, intellij, intellij-plugin, semantic, semantic-commits
- Language: Kotlin
- Homepage: https://plugins.jetbrains.com/plugin/13389-conventional-commit
- Size: 2.42 MB
- Stars: 336
- Watchers: 5
- Forks: 18
- Open Issues: 35
-
Metadata Files:
- Readme: README.md
- Changelog: change-notes/0_10_0.html
- License: LICENSE
Awesome Lists containing this project
README
# Conventional Commit
### Available @ [JetBrains Plugins Repository][1]
Looking for the latest **plugin binaries**? Get them [here][2] as `.zip`
Supported IDE versions **from 0.23.0**: `223.4884` to `243.*` (both inclusive)
Supported IDE versions **from 0.19.0**: `202.6397` to `233.*` (both inclusive)
Supported IDE versions **upto 0.18.0**: `193.****` to `212.*` (both inclusive)Additional Providers are available by installing other lightweight plugins.
| Context & GitHub | Plugins Repository | Type | Scope | Subject | Body | Footer type | Footer value |
|-------------------|:--------------------------------------------:|:------------------:|:------------------:|:-------:|:----:|:-----------:|:------------:|
| [Angular (2+)][6] | :heavy_check_mark: [Install][7] (Deprecated) | | :heavy_check_mark: | | | | |
| [Commitlint][8] | :heavy_check_mark: [Install][9] (Deprecated) | :heavy_check_mark: | :heavy_check_mark: | | | | |
| GitHub | Coming soon... | | | | | | |
| VCS (extended) | Coming soon... | | | | | | |-----
The aim of this plugin is to provide completion for [conventional commits][3],
also named _semantic_ commits, inside the VCS Commit dialog. The plugin must provide:- **standard completion** — based on context
- **template completion** — initiated intentionally
- **extensibility** — which means allowing attaching providers for the various parts of the commit:
_type_, _scope_, _subject_, _body_ and _footer_-----
Writing quality commit messages is important to keep an understandable and searchable history
of your project. Conventional commits are a perfect example of that.
However, as an example, it can happen choosing the correct _type_ or _scope_ isn't that immediate.
We might have forgotten about when a specific _type_ should be used or what are the
available _scopes_, or we simply need a way to quickly complete the _subject_.The plugin helps with the above, while also respecting the aforementioned requirements, so that
each user is able to customize the experience based on its preferences.### Completion modes
The plugin offers two completion modes.
- #### Context based
The commit message can be written like you have done until now, but by invoking
completion you'll be offered the correct items based on the scope.
Certain commodities, such as auto-completing the scope parenthesis or the `:` separator,
are there too.
- #### Template based
By firstly invoking the _type_ completion and confirming an item, a template will be
generated in place, and you'll be guided through each token (_scope_ and _subject_).
You can also go back (with `shift + tab`) and change your pick.
Arbitrary characters' insertion is also allowed inside each template's range marker.
### Inspections
Inspections are bundled too, and they're **extensible**, which means a _Provider_ may contribute with
additional ones.
The standard inspection warns you if you're not following the Conventional Commit standard.
In case, just press `ctrl + alt + l` (on Windows) and the commit message will be formatted for you.
You may enable/disable inspections via _Settings > Version Control > Commit_
### Documentation
Each commit token is able to hold documentation. This is important in case you forgot their meaning,
or if you want to share additional pieces of information with users.Documentation for tokens which might hold long text, spawning multiple lines, is rendered a bit differently.
### Custom default types and scopes
Default commit types and scopes can be totally customized and shared with your team by creating and populating
a JSON file named
```
conventionalcommit.json
```The plugin uses an internal version of that file, which you can export via _Export built-in defaults to path_.
You may then customize it per your needs.You're allowed to provide custom commit's _types_, _scopes_ and _footer types_, given the JSON file respects a [Schema][5].
An example is shown below:```json
{
"types": {
"customType": {
"description": "My custom type description"
},
"anotherCustomType": {},
"yetAnotherCustomType": {
"description": "This is my description",
"scopes": {
"first": {
"description": "My first description"
},
"second": {
"description": "My second description"
}
}
}
},
"commonScopes": {
"one": {
"description": "My first common scope"
},
"two": {}
},
"footerTypes": [
{
"name": "My-custom-footer",
"description": "My footer description"
}
]
}
```**If the file is located in the project's root directory, the plugin will pick it up automatically**,
making it easy to version it, and avoiding to explicitly set a _Custom default tokens_ path.### Providers
In a fresh installation you'll only be offered the most common tokens (e.g. `fix`, `feat`, `build`, `BREAKING CHANGE`, etc.),
but the plugin exposes an API to enhance completion items, per each token.
_Type_, _scope_ and _subject_ each have a specific entry point, and the implementation is called
**Provider**. Each Provider is listed in a table, based on its context.You're allowed to re-order Providers per your necessities, knowing that possible duplicates
are going to be automatically filtered by the core engine.More on this later on...
-----
## Author and contributors
- Edoardo Luppi ()
- [ymind][4]
- [bric3][11]
- [LinWanCen][12][1]: https://plugins.jetbrains.com/plugin/13389-conventional-commit
[2]: https://github.com/lppedd/idea-conventional-commit/releases
[3]: https://conventionalcommits.org/
[4]: https://github.com/ymind
[5]: https://github.com/lppedd/idea-conventional-commit/blob/master/src/main/resources/defaults/conventionalcommit.schema.json
[6]: https://github.com/lppedd/idea-conventional-commit-angular2
[7]: https://plugins.jetbrains.com/plugin/13405-angular-conventional-commit
[8]: https://github.com/lppedd/idea-conventional-commit-commitlint
[9]: https://plugins.jetbrains.com/plugin/14046-commitlint-conventional-commit
[10]: https://join.slack.com/t/ideaconventio-1ts8697/shared_invite/zt-iuztsuth-pr_5wjvZGqITHCz3OOUxgQ
[11]: https://github.com/bric3
[12]: https://github.com/LinWanCen