which is commonly used in other projects as well
Hi all,
Our team of around six people has recently started using PhpStorm for a PHP project, and we're quite happy with it so far. We've also set up a standard for commit messages to make our version control clearer and more structured, as well as to generate meaningful changelogs. To achieve this, we're using Grunt along with some plugins.
We follow a specific format for our commit messages, which is commonly used in other projects as well. Here’s what we use at the moment:
Format:
<type>(<scope>): <subject>
<body>
Type: Describes the kind of change (e.g., feature, bug fix, etc.)
Scope: The part of the project or code being modified (e.g., forum, news, etc.)
Subject: A brief, concise summary of the changes.
Body (optional): A more detailed explanation of the changes.
Types include:
feat: New feature
fix: Bug fix
wip: Work in progress
docs: Documentation changes
style: Code style changes (e.g., formatting, whitespace)
refactor: Refactor code (no feature or bug fix)
test: Adding tests
chore: Auxiliary tasks (e.g., build process)
Now, what we're looking for is a way to simplify this process within PhpStorm by having a commit message template feature. Ideally, we would be able to:
Select the type and scope from a dropdown.
Automatically populate the commit message template with placeholders.
Quickly fill in the subject and body.
I haven’t found a plugin that offers this functionality yet. It seems like this would require deeper integration with PhpStorm’s core, but I’m wondering if anyone has come across this before or knows of a plugin that could help.
Alternatively, is this a feature that could be added to PhpStorm?
Thanks in advance for your input!
请先登录再写评论。
Hi,
We currently do not offer such functionality, and it sounds like it could be a cool separate plugin.
You can use git's native feature, create .gitmessage file in your home directory (enter the template there) and run:
git config --global commit.template ~/.gitmessage
additionally, you can request this as a feature on our youtrack: https://youtrack.jetbrains.com/