Compare commits
No commits in common. "0cd0a4343a0fb001d6eb76ff529e8eca99e61449" and "d989d1c84416f0269da6e19c605d6f158b8402fd" have entirely different histories.
0cd0a4343a
...
d989d1c844
10 changed files with 32 additions and 57 deletions
2
.idea/.name
generated
2
.idea/.name
generated
|
|
@ -1 +1 @@
|
|||
commit-message-prefixer
|
||||
hello-world-plugin
|
||||
16
.idea/csv-editor.xml
generated
Normal file
16
.idea/csv-editor.xml
generated
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="CsvFileAttributes">
|
||||
<option name="attributeMap">
|
||||
<map>
|
||||
<entry key="/foo">
|
||||
<value>
|
||||
<Attribute>
|
||||
<option name="separator" value="," />
|
||||
</Attribute>
|
||||
</value>
|
||||
</entry>
|
||||
</map>
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
||||
15
.idea/git_toolbox_prj.xml
generated
15
.idea/git_toolbox_prj.xml
generated
|
|
@ -1,15 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="GitToolBoxProjectSettings">
|
||||
<option name="commitMessageIssueKeyValidationOverride">
|
||||
<BoolValueOverride>
|
||||
<option name="enabled" value="true" />
|
||||
</BoolValueOverride>
|
||||
</option>
|
||||
<option name="commitMessageValidationEnabledOverride">
|
||||
<BoolValueOverride>
|
||||
<option name="enabled" value="true" />
|
||||
</BoolValueOverride>
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
||||
1
.idea/gradle.xml
generated
1
.idea/gradle.xml
generated
|
|
@ -1,6 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="GradleMigrationSettings" migrationVersion="1" />
|
||||
<component name="GradleSettings">
|
||||
<option name="linkedExternalProjectsSettings">
|
||||
<GradleProjectSettings>
|
||||
|
|
|
|||
15
README.md
15
README.md
|
|
@ -1,15 +0,0 @@
|
|||
A plugin for JetBrains IDEs that automatically prefixes commit messages with information extracted from branch names.
|
||||
|
||||
You can find the plugin here: https://plugins.jetbrains.com/plugin/26938-commit-message-prefixer
|
||||
|
||||
Features:
|
||||
- Extract information from branch names using configurable regex patterns
|
||||
- Format commit messages using configurable format patterns
|
||||
- Enable/disable the plugin from the commit dialog
|
||||
|
||||
The branch name extraction pattern is configurable from the IDE settings
|
||||
|
||||
Example:
|
||||
- Branch name: `feature/12345-add-new-feature`
|
||||
- Commit message: `Initial implementation`
|
||||
- Result: `#12345 - Initial implementation`
|
||||
23
build.gradle
23
build.gradle
|
|
@ -4,7 +4,7 @@ plugins {
|
|||
}
|
||||
|
||||
group = 'org.cobalyte'
|
||||
version = '1.2.1'
|
||||
version = '1.0.0'
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
|
|
@ -12,7 +12,7 @@ repositories {
|
|||
|
||||
// Configure Gradle IntelliJ Plugin
|
||||
intellij {
|
||||
version = '2024.3.5'
|
||||
version = '2023.1.5'
|
||||
type = 'IC' // Target IDE Platform - IC for IntelliJ IDEA Community Edition
|
||||
}
|
||||
|
||||
|
|
@ -24,7 +24,7 @@ dependencies {
|
|||
// Configure plugin metadata
|
||||
patchPluginXml {
|
||||
sinceBuild = '231'
|
||||
untilBuild = ''
|
||||
untilBuild = '241.*'
|
||||
pluginDescription = '''
|
||||
A plugin for JetBrains IDEs that automatically prefixes commit messages with information extracted from branch names.
|
||||
|
||||
|
|
@ -43,22 +43,7 @@ patchPluginXml {
|
|||
<li>Result: "#12345 - Initial implementation"</li>
|
||||
</ul>
|
||||
'''
|
||||
changeNotes = '''
|
||||
<h3>Version 1.2.1</h3>
|
||||
<ul>
|
||||
<li>Added support for 2025.1</li>
|
||||
</ul>
|
||||
|
||||
<h3>Version 1.2.0</h3>
|
||||
<ul>
|
||||
<li>Extended compatibility to support 2024.3.x IDEs including Rider 2024.3.6</li>
|
||||
</ul>
|
||||
|
||||
<h3>Version 1.1.0</h3>
|
||||
<ul>
|
||||
<li>Initial release of the Commit Message Prefixer plugin</li>
|
||||
</ul>
|
||||
'''
|
||||
changeNotes = 'Initial release of the Commit Message Prefixer plugin'
|
||||
}
|
||||
|
||||
test {
|
||||
|
|
|
|||
|
|
@ -50,6 +50,11 @@ public class CommitPrefixerCheckinHandlerFactory extends CheckinHandlerFactory {
|
|||
return checkBox;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void refresh() {
|
||||
checkBox.setSelected(settings.isEnabled());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveState() {
|
||||
settings.setEnabled(checkBox.isSelected());
|
||||
|
|
|
|||
|
|
@ -71,8 +71,8 @@ public class CommitPrefixerConfigurable implements Configurable {
|
|||
formatHelp.setForeground(JBColor.GRAY);
|
||||
|
||||
JBLabel prefixingHelp = new JBLabel("<html>Select how the prefix should be added to commit messages:<br>" +
|
||||
"<b>Manual</b>: You manually click the 'Add Prefix' button in the commit tool window.<br>" +
|
||||
"<b>Automatic</b>: The prefix is added automatically after you click Commit.</html>");
|
||||
"<b>Pre-fill in commit dialog</b>: You need to click the 'Add Prefix' button in the commit dialog.<br>" +
|
||||
"<b>Before commit</b>: The prefix will be added automatically before commit.</html>");
|
||||
prefixingHelp.setForeground(JBColor.GRAY);
|
||||
|
||||
// Build the form
|
||||
|
|
@ -99,7 +99,7 @@ public class CommitPrefixerConfigurable implements Configurable {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void apply() {
|
||||
public void apply() throws ConfigurationException {
|
||||
CommitPrefixerSettings settings = CommitPrefixerSettings.getInstance(project);
|
||||
settings.setBranchExtractionPattern(branchExtractionPatternField.getText());
|
||||
settings.setCommitMessageFormat(commitMessageFormatField.getText());
|
||||
|
|
|
|||
|
|
@ -31,8 +31,8 @@ public class CommitPrefixerSettings implements PersistentStateComponent<CommitPr
|
|||
|
||||
// Enum for prefixing modes
|
||||
public enum PrefixingMode {
|
||||
MANUAL("Manual"),
|
||||
AUTOMATIC("Automatic");
|
||||
MANUAL("Pre-fill in commit dialog"),
|
||||
AUTOMATIC("Before commit");
|
||||
|
||||
private final String displayName;
|
||||
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@
|
|||
<!-- Add the commit prefix action to the VCS menu -->
|
||||
<action id="org.cobalyte.AddCommitPrefixAction"
|
||||
class="org.cobalyte.AddCommitPrefixAction"
|
||||
text="Add Prefix to Commit Message"
|
||||
text="Add Prefix"
|
||||
description="Add a prefix to the commit message based on the current branch name">
|
||||
<add-to-group group-id="Vcs.MessageActionGroup" anchor="first"/>
|
||||
</action>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue