Skip to content

mai-space/plugin-phpstorm-typo3-commit-template

Repository files navigation

TYPO3 Commit Template

Build Version Downloads

Inspired by the commit guidelines of TYPO3 here.

Usage

Open your Commit-Dialog by clicking the module or pressing Control/CMD + K.
You can open the template dialog by pressing Control + Shift + K.

shortcut-to-dialog


Once you are in the dialog, you can navigate by using the Tab Key.
Fill the form as you see fit.

dialog


If you are happy with your commit message, press Apply and the message will be templated and inserted into your commit message dialog.

filled_dialog


Please note, that the template is dynamic. So filling breaking changes will result in the [!!!] flag being set.
This also works with the to-do list which results in the [WIP] flag being set.
If you do not want any flags, just fill the Done Tasks Section, so only the Type will be displayed.
As you can see in the Image above, by clicking the branch icon next to the resolves and related issue number list, the current issue number in the currently checked out branch will be inserted. For Example a branch named like this "feature/12345-a-new-feature" will result in an issue number "12345" being inserted into the relative inputfield. But when applied, will have the format #12345.
If you use your keyboard to traverse the dialog window, you will automatically get a new list item (* ) for each focus into an empty textarea or by pressing the return key, while you are focussed. If you leave a text area that only contains an empty list item (* ) it will be deleted.
If the Task-list becomes too long horizontal, the text will wrap. If it becomes to long vertically, you can scroll up and down inside the textarea.
For every Element in the Dialog, a placeholder shows you the suggested format and while hovering, you get a nice descriptive tool tip.
The Commit message gets parsed, after you hit Apply which leads to any list item starting with "- " to become "* " and the issue numbers will all be listed in separate lines and starting with an #. For more Information on why that is, please read the Guideline Documentation of TYPO3.

message

If you want to fix a typo or add items, simply click the TYPO3 Icon or hit the Shortcut again. Your Commit Message will be reopend and can be edited.

message

message

Installation

  • Using IDE built-in plugin system:

    Settings/Preferences > Plugins > Marketplace > Search for "plugin-phpstorm-typo3-commit-template" > Install Plugin

  • Manually:

    Download the latest release and install it manually using Settings/Preferences > Plugins > ⚙️ > Install plugin from disk...


Acknowledgements

Origins

This Plugin has already once been made by me. But I wanted to refactor not only my Jetbrains Marketplace Account but also the Code Base and Design of the Plugin. If you want to take a look at the previous Code: Check it out here.

Plugin based on the IntelliJ Platform Plugin Template

You can make your own Plugin using this Template.