From 62ca71a14016ba7cc749f36981839a898c2aae57 Mon Sep 17 00:00:00 2001 From: Awiteb Date: Sun, 17 Nov 2024 16:19:43 +0000 Subject: [PATCH] chore: Toml formatting Signed-off-by: Awiteb --- Cargo.toml | 16 ++++++++++------ cliff.toml | 28 ++++++++++++++-------------- sumi.toml | 14 +++++++++++++- 3 files changed, 37 insertions(+), 21 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 26c4950..3f5c90c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,26 +9,30 @@ license = "AGPL-3.0-or-later" [dependencies] -serde = { version = "1.0.214", features = ["derive"] } +regex = "1.11.1" +rust-i18n = "3.1.2" serde_json = "1.0.132" +thiserror = "2.0.2" toml = "0.8.19" tracing = "0.1.40" tracing-subscriber = "0.3.18" -thiserror = "2.0.2" -regex = "1.11.1" -rust-i18n = "3.1.2" +serde = { version = "1.0.214", features = ["derive"] } reqwest = { version = "0.12.9", default-features = false, features = [ "charset", "http2", "rustls-tls", ] } -tokio-util = { version = "0.7.12", default-features = false } +teloxide = { version = "0.13.0", default-features = false, features = [ + "macros", + "ctrlc_handler", + "rustls", +] } tokio = { version = "1.41.1", default-features = false, features = [ "rt-multi-thread", "macros", "sync", "signal", ] } +tokio-util = { version = "0.7.12", default-features = false } url = { version = "2.5.3", default-features = false, features = ["serde"] } -teloxide = { version = "0.13.0", default-features = false, features = ["macros", "ctrlc_handler", "rustls"] } diff --git a/cliff.toml b/cliff.toml index e7fc130..4a855ac 100644 --- a/cliff.toml +++ b/cliff.toml @@ -64,10 +64,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).\n """ postprocessors = [ - {pattern = '', replace = "https://git.4rs.nl/awiteb/forgejo-guardian"}, - {pattern = '- (\w+)(\(\w+\))?:', replace = "- "}, # Remove the type - {pattern = '- \((\w+)\):', replace = "- (**$1**)"}, # Make the scope blod - {pattern = "\t", replace = " "}, + { pattern = '', replace = "https://git.4rs.nl/awiteb/forgejo-guardian" }, + { pattern = '- (\w+)(\(\w+\))?:', replace = "- " }, # Remove the type + { pattern = '- \((\w+)\):', replace = "- (**$1**)" }, # Make the scope blod + { pattern = "\t", replace = " " }, ] # remove the leading and trailing whitespace from the template @@ -75,24 +75,24 @@ trim = true [git] # parse the commits based on https://www.conventionalcommits.org -conventional_commits = false +conventional_commits = false filter_unconventional = true # process each line of a commit as an individual commit split_commits = false # regex for preprocessing the commit messages commit_preprocessors = [ - {pattern = '\((\w+\s)?#([0-9]+)\)', replace = "([**#${2}**](/issues/${2}))"}, # replace issue numbers (Note the PR is also an issue in Forgejo, so this will also link to PRs) - {pattern = ' +$', replace = ""}, # Remove trailing whitespace. - {pattern = ' +', replace = " "}, # Replace multiple spaces with a single space. + { pattern = '\((\w+\s)?#([0-9]+)\)', replace = "([**#${2}**](/issues/${2}))" }, # replace issue numbers (Note the PR is also an issue in Forgejo, so this will also link to PRs) + { pattern = ' +$', replace = "" }, # Remove trailing whitespace. + { pattern = ' +', replace = " " }, # Replace multiple spaces with a single space. ] # regex for parsing and grouping commits commit_parsers = [ - {message = "^feat", group = "Added"}, - {message = "^fix", group = "Fixed"}, - {message = "^(refactor|change)", group = "Changed"}, - {message = "^deprecate", group = "Deprecated"}, - {message = "^remove", group = "Removed"}, - {message = "^security", group = "Security"}, + { message = "^feat", group = "Added" }, + { message = "^fix", group = "Fixed" }, + { message = "^(refactor|change)", group = "Changed" }, + { message = "^deprecate", group = "Deprecated" }, + { message = "^remove", group = "Removed" }, + { message = "^security", group = "Security" }, ] protect_breaking_commits = false # filter out the commits that are not matched by commit parsers diff --git a/sumi.toml b/sumi.toml index 768abb9..01a3a9f 100644 --- a/sumi.toml +++ b/sumi.toml @@ -50,7 +50,19 @@ scopes_allowed = [] # Rule: List of allowed commit types. # An empty list allows all types. Example: ["feat", "fix", "docs"]. -types_allowed = ["feat", "fix", "docs", "refactor", "change", "deprecate", "remove", "security", "perf", "test", "chore"] +types_allowed = [ + "feat", + "fix", + "docs", + "refactor", + "change", + "deprecate", + "remove", + "security", + "perf", + "test", + "chore", +] # Rule: Header must match regex pattern. # Example: '^JIRA-\d+:'.