This extension is an extension made to formalize git commit messages. By using a template and variables, you can define how the commit message needs to looks and which data you want in this message.
By example: When you want to specify a scope in your commits, you can create a variable named scope in th e template like this {scope}
If you want to specify which data you want in this scope variable, you can specify it with the variable settings
{
"scope": [
{
"label": "🟢 App"
},
{
"label": "🟠 Api"
},
{
"label": "🔵 Scripts"
}
]
}I show you more on the #Settings part
toto
Use ctrl+alt+enter (cmd+shift+enter on Mac) or click on the icon in SouceControl
![]()
An UI is available HERE, it's not the best UI but it can help you make your first configuration for the extension
Hosted on Netlify
{
"vscodeGitCommit.insertMode": "Concatenate"
}'Concatenate' give the ability to use multiple message in the same commit where 'Replace' not
{
"vscodeGitCommit.template": [
"{feat}({scope}): {message}"
"by {author}"
]
}By defining one string, you create a line, with two strings like in the example, you define two line for the template.
You can define dynamic content by using { & } in doc, I called it a variable.
When triggering this extension, a value for each variable is prompt.
{
"vscodeGitCommit.variables": {
"author": [
{
"label": "Devs",
"detail": "Use when a change is made by Developers"
},
{
"label": "Ops"
}
],
"feat": "keke"
}
}For each variables defined in the template above, you can define the content:
- If not set -> Free string input
- If it's an Array -> A select of choices is displayed
- If it's a string three possibilities
- the value is oneOf 'keke' | 'angular' | 'semantic' | 'alpha8' -> A predefined Array is associated to the variable
- the value startWith 'files' -> An array of files with defined status is displayed as choices
- the value looks like '<>...<<something_else>>' -> a merge of array between the variable 'something' and 'something_else' is created as choices
- The 'detail' property is optionnal
- The 'label' property is used as the content include in template
- (For old users) The 'id' property is now automatically generated and not used anymore by the extension
- 'keke' is the prefix I use personnally
- 'angular' is prefix specific to angular repos (HELP: if someone has a full config for angular commits, can you share it with me by creating a PR or Issue ?)
- 'alpha8' is prefix we used in the enterprise where I work
- 'semantic' is an other normalization of prefix but I lost the link associated :/
- 'files': All staged and changed files
- 'files.deleted': All deleted staged and changed files
- 'files.modified': All modified staged and changed files
- 'files.added': All added staged and changed files
- 'files.staged': All staged files
- 'files.staged.deleted': All deleted staged files
- 'files.staged.modified': All modified staged files
- 'files.staged.added': All added staged files
- 'files.changed': All changed files
- 'files.changed.deleted': All deleted changed files
- 'files.changed.modified': All modified changed files
- 'files.changed.added': All added changed files
'branch': Show you a select with the choice between short and long name for current branch
{
"vscodeGitCommit.defaultVariablesValues": {
"author": "@RIOU Kevin"
}
}For each variables defined in the template not used in variables setting, you can define a default value pretyped in the input
In the upside example, for the variable author, the input is prefill with @RIOU Kevin.
{
"vscodeGitCommit.variablesDisplayTitles": {
"author": "Fill the pseudo of the person commiting with an @"
}
}For each variables prompt, you can define a default value pretyped in the input
In the upside example, for the variable author, the input will show the title Fill the pseudo of the person commiting with an @.
You can share the config you made for you by creating a pull request, in the folder 'share' you can find a Readme as a template and an example made by jycouet
You just have to create a pull-request 😉 with what you want and a clear description of the goal of your feature
- ✨feature: Trim messages when finished
- ✨feature: Ability to define titles on prompts
- ✨feature: Ability to define default values on prompts
- ✨feature: Trim messages when finished
- ✨feature: Ability to define titles on prompts
- ✨feature: Ability to define default values on prompts
- 🐞fix: update for vscode api change in 1.70 about repositories
- ✨feature: ability to define default value for free text inputs
- ✨feature: add repo current branch in variables
- 🐞fix: settings migration script fix from V3.0.0
third release with an UI O_o and a lot of new features (btw: we reached the 5k installs THX U
♥️ )
- ✨feature: use of information or error message as feedback
- ✨feature: update contributes.configuration $schema
- ✨feature: add an UI to generate settings (cf: this UI)
- ✨feature: add PR template
- ✨feature: add a folder for settings sharing between users
- ✨feature: add ability to search for files using predefined variable names
- 📄docs (docs): update docs globaly and make a web version
- ✨feature: auto focus scm commit input on finish (cf: issues #10)
- ✨feature: add abilities to concatenate multiple variables in settings (cf: issues #11 & #12)
second release OH YEAHHH !!!!
- ✨feature: add ability to use text input or select input for any variables
- 📄docs (docs): update docs with animated gif
- ✨feature: Handle multi repo case
- 🐞fix: Update icon (cf: issues #4)
- 🐞fix: Handle cancel action when typing variables (cf: issues #5)
⚙️refactor: Refacto on extension command name
- 🐞fix: Update icon (cf: issues #4)
- ✨feat(workflow): Add abilities to create custom message format using simple brackets in settings, see doc
- ⚙️refactor(global): Refacto on major part of the code
- 🌈style(typescript/prettier): Pass into prettier + update ts rules
- ✨feature: On demand, add based commitizen prefix for alpha8
- 🔵other: Change default mode to concatenate settings
First Release, I've done it !!
- ✨feature: Replace icon with outlined
- ✨feature: add a mode to concatenate message with existing or replace existing
- 🐞fix: focus on quickPick not on scm input box when triggering extension
- ✨feature: V0.0.3 add prefix sets
- ✨feature: Add custom prefix setting
- 🐞fix: Open SCM view when prefix selector is opened, not at the end of process
- Initial release
