feature: add conventional commit message generator (#574)

This commit is contained in:
leo 2024-10-18 16:20:45 +08:00
parent 2821bab77c
commit 9153bbe07f
No known key found for this signature in database
10 changed files with 369 additions and 8 deletions

View file

@ -0,0 +1,28 @@
using System.Collections.Generic;
namespace SourceGit.Models
{
public class ConventionalCommitType
{
public string Type { get; set; } = string.Empty;
public string Description { get; set; } = string.Empty;
public static readonly List<ConventionalCommitType> Supported = new List<ConventionalCommitType>()
{
new ConventionalCommitType("feat", "Adding a new feature"),
new ConventionalCommitType("fix", "Fixing a bug"),
new ConventionalCommitType("docs", "Updating documentation"),
new ConventionalCommitType("style", "Elements or code styles without changing the code logic"),
new ConventionalCommitType("test", "Adding or updating tests"),
new ConventionalCommitType("chore", "Making changes to the build process or auxiliary tools and libraries"),
new ConventionalCommitType("revert", "Undoing a previous commit"),
new ConventionalCommitType("refactor", "Restructuring code without changing its external behavior")
};
public ConventionalCommitType(string type, string description)
{
Type = type;
Description = description;
}
}
}