VSCode Conventional Commits
![Financial Contributors on Open Collective](https://opencollective.com/vscode-conventional-commits/all/badge.svg?label=financial+contributors)
Conventional Commits for VSCode.
Features
This extension helps you to fill in commit message according to
Conventional Commits.
Usage
![Demo](https://github.com/vivaxy/vscode-conventional-commits/raw/HEAD/assets/docs/demo.gif)
You can access VSCode Conventional Commits in two ways:
Command + Shift + P
or Ctrl + Shift + P
, enter Conventional Commits
,
and press Enter
.
- Click the icon on the Source Control menu. See the image below.
![Icon on the Source Control menu](https://github.com/vivaxy/vscode-conventional-commits/raw/HEAD/assets/docs/icon-on-the-source-control-menu.png)
Extension Configuration
name |
description |
default |
conventionalCommits.autoCommit |
Control whether the extension should commit files after: forming the message or closing the editor tab. When #git.enableSmartCommit# enabled and #git.smartCommitChanges# was set to all , It allows to commit all changes when there are no staged changes. And set #git.postCommitCommand# to sync to run git.sync after commit. |
true |
conventionalCommits.emojiFormat |
Specify which format will be shown in the gitmoji . |
code |
conventionalCommits.gitmoji |
Control whether the extension should prompt for a gitmoji . |
true |
conventionalCommits.lineBreak |
Specify which word will be treated as line breaks in the body . Blank means no line breaks. |
"" |
conventionalCommits.promptBody |
Control whether the extension should prompt for the body section. |
true |
conventionalCommits.promptFooter |
Control whether the extension should prompt for the footer section. |
true |
conventionalCommits.promptCI |
Control whether the extension should prompt for skipping CI run. |
false |
conventionalCommits.promptScopes |
Control whether the extension should prompt for the scope section. |
true |
conventionalCommits.scopes |
Specify available selections in the scope section. |
[] |
conventionalCommits.showEditor |
Control whether the extension should show the commit message as a text document in a separate tab. |
false |
conventionalCommits.showNewVersionNotes |
Control whether the extension should show the new version notes. |
true |
conventionalCommits.silentAutoCommit |
Control that auto commit should be silent, without focusing source control panel. |
false |
conventionalCommits.editor.keepAfterSave |
Control whether the extension should keep the editor tab open after saving the commit message. |
false |
Commit Workflow
The recommended workflow automatically add, commit and push files by default.
If you want the extension to only fill in the message, disable autoCommit
configuration.
The Recommended Workflow
- Active the extension.
- Type messages.
The extension will automatically add the changed files, perform the commit and
push the commit to remote.
- Enable
Settings > conventionalCommits.autoCommit
configuration of the
extension. The extension enables Settings > conventionalCommits.autoCommit
by default.
- Enable
Settings > git.enableSmartCommit
and set
Settings > git.smartCommitChanges
to all
to commit all changes when there
are no staged changes.
- Set
Settings > git.postCommitCommand
to sync
to run git.sync
after
commit.
- [x]
body-full-stop
- [ ]
body-leading-blank
- [x]
body-max-length
- [ ]
body-max-line-length
- [x]
body-min-length
- [ ]
footer-leading-blank
- [x]
footer-max-length
- [ ]
footer-max-line-length
- [x]
footer-min-length
- [x]
header-case
- [x]
header-full-stop
- [x]
header-max-length
- [x]
header-min-length
- [ ]
references-empty
- [x]
scope-enum
- [x]
scope-case
- [x]
scope-empty
- [x]
scope-max-length
- [x]
scope-min-length
- [x]
subject-case
- [x]
subject-empty
- [x]
subject-full-stop
- [x]
subject-max-length
- [x]
subject-min-length
- [x]
type-enum
- [x]
type-case
- [x]
type-empty
- [x]
type-max-length
- [x]
type-min-length
- [ ]
signed-off-by
FAQ
Q: How do I add a line break in messages?
A: Set lineBreak
configuration to \n
. When you're typing, enter \n
as
a line break.
![image](https://user-images.githubusercontent.com/4216856/107896171-81d25e80-6f70-11eb-926e-2a8ba33e435e.png)
Or \\n
in JSON format.
![image](https://user-images.githubusercontent.com/4216856/107896204-9c0c3c80-6f70-11eb-8245-6a1357172c6b.png)
Q: How do I resolve repo not found
error?
A: See issue discussion
#15.
Q: How do I use commitlint
in showEditor
mode?
A: The extension - vscode-commitlint will helpful!
Troubleshooting
- Switch to the VSCode
OUTPUT
tab, select Conventional Commits
.
- Copy all the output. Before sharing it, make sure you have removed all
private information.
![Debug instruction](https://github.com/vivaxy/vscode-conventional-commits/raw/HEAD/assets/docs/debug-instruction.png)
Contribution
- The vscode task needs to install the extension -
vscode-tsl-problem-matcher.
- The effect of code changes needs to reactivate the extension. Just restart
the task.
Team Members
Financial Contributors
Become a financial contributor and help us sustain our community.
[Contribute]
Individuals
![](https://opencollective.com/vscode-conventional-commits/individuals.svg?width=890)
Organizations
Support this project with your organization. Your logo will show up here with a
link to your website.
[Contribute]
![](https://opencollective.com/vscode-conventional-commits/organization.svg?width=890)