Repository: cocogitto/cocogitto
Pull request #309 (2023-07-28 14:05:51)

feat: gha bot support
PR makes minor changes to internal implementation details in support of deprecating the [Cocogitto GitHub Bot](https://github.com/cocogitto/cocogitto-bot/pull/13)'s use of `conventional_commit_parser` in favor of using Cocogitto itself to validate commit messages.

cocogitto-bot[bot]: :heavy_check_mark: a3cd430...6a5cb35 - Conventional commits check succeeded.
codecov[bot]: ## [Codecov](https://app.codecov.io/gh/cocogitto/cocogitto/pull/309?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cocogitto) Report
> Merging [#309](https://app.codecov.io/gh/cocogitto/cocogitto/pull/309?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cocogitto) (6a5cb35) into [main](https://app.codecov.io/gh/cocogitto/cocogitto/commit/36d1ea5d94d2785d5019702c3d51c734436ce3b9?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cocogitto) (36d1ea5) will **decrease** coverage by `0.13%`.
> The diff coverage is `58.62%`.

```diff
@@            Coverage Diff             @@
##             main     #309      +/-   ##
==========================================
- Coverage   85.32%   85.20%   -0.13%     
==========================================
  Files          45       45              
  Lines        6243     6258      +15     
==========================================
+ Hits         5327     5332       +5     
- Misses        916      926      +10     
```


| [Files Changed](https://app.codecov.io/gh/cocogitto/cocogitto/pull/309?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cocogitto) | Coverage Δ | |
|---|---|---|
| [src/conventional/commit.rs](https://app.codecov.io/gh/cocogitto/cocogitto/pull/309?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cocogitto#diff-c3JjL2NvbnZlbnRpb25hbC9jb21taXQucnM=) | `92.82% <ø> (ø)` | |
| [src/conventional/error.rs](https://app.codecov.io/gh/cocogitto/cocogitto/pull/309?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cocogitto#diff-c3JjL2NvbnZlbnRpb25hbC9lcnJvci5ycw==) | `61.53% <0.00%> (ø)` | |
| [src/settings/error.rs](https://app.codecov.io/gh/cocogitto/cocogitto/pull/309?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cocogitto#diff-c3JjL3NldHRpbmdzL2Vycm9yLnJz) | `42.85% <ø> (ø)` | |
| [src/settings/mod.rs](https://app.codecov.io/gh/cocogitto/cocogitto/pull/309?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cocogitto#diff-c3JjL3NldHRpbmdzL21vZC5ycw==) | `75.09% <60.71%> (-2.64%)` | :arrow_down: |

:mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cocogitto)


Patch:
diff --git a/src/bin/cog/main.rs b/src/bin/cog/main.rs
index fff5944..4d2f541 100644
--- a/src/bin/cog/main.rs
+++ b/src/bin/cog/main.rs
@@ -281,6 +281,10 @@ enum Command {
         /// Dry-run: print the target version. No action taken
         #[arg(short, long)]
         dry_run: bool,
+
+        /// Specify a "Skip CI" string to append to the end of the commit
+        #[arg(long = "skip-ci")]
+        skip_ci: Option<String>,
     },
 
     /// Install cog config files
@@ -358,6 +362,7 @@ fn main() -> Result<()> {
             package,
             annotated,
             dry_run,
+            skip_ci,
         } => {
             let mut cocogitto = CocoGitto::get()?;
             let is_monorepo = !SETTINGS.packages.is_empty();
@@ -392,6 +397,7 @@ fn main() -> Result<()> {
                             hook_profile.as_deref(),
                             annotated,
                             dry_run,
+                            skip_ci,
                         )?
                     }
                     None => cocogitto.create_monorepo_version(
@@ -400,6 +406,7 @@ fn main() -> Result<()> {
                         hook_profile.as_deref(),
                         annotated,
                         dry_run,
+                        skip_ci,
                     )?,
                 }
             } else {
@@ -409,6 +416,7 @@ fn main() -> Result<()> {
                     hook_profile.as_deref(),
                     annotated,
                     dry_run,
+                    skip_ci,
                 )?
             }
         }
diff --git a/src/command/bump/monorepo.rs b/src/command/bump/monorepo.rs
index 4ca58c8..90e5ae9 100644
--- a/src/command/bump/monorepo.rs
+++ b/src/command/bump/monorepo.rs
@@ -45,16 +45,28 @@ impl CocoGitto {
         hooks_config: Option<&str>,
         annotated: Option<String>,
         dry_run: bool,
+        skip_ci: Option<String>,
     ) -> Result<()> {
         match increment {
             IncrementCommand::Auto => {
                 if SETTINGS.generate_mono_repository_global_tag {
-                    self.create_monorepo_version_auto(pre_release, hooks_config, annotated, dry_run)
+                    self.create_monorepo_version_auto(
+                        pre_release,
+                        hooks_config,
+                        annotated,
+                        dry_run,
+                        skip_ci,
+                    )
                 } else {
                     if annotated.is_some() {
                         warn!("--annotated flag is not supported for package bumps without a global tag");
                     }
-                    self.create_all_package_version_auto(pre_release, hooks_config, dry_run)
+                    self.create_all_package_version_auto(
+                        pre_release,
+                        hooks_config,
+                        dry_run,
+                        skip_ci,
+                    )
                 }
             }
             _ => self.create_monorepo_version_manual(
@@ -63,6 +75,7 @@ impl CocoGitto {
                 hooks_config,
                 annotated,
                 dry_run,
+                skip_ci,
             ),
         }
     }
@@ -72,6 +85,7 @@ impl CocoGitto {
         pre_release: Option<&str>,
         hooks_config: Option<&str>,
         dry_run: bool,
+        skip_ci: Option<String>,
     ) -> Result<()> {
         self.pre_bump_checks()?;
         // Get package bumps
@@ -96,8 +110,13 @@ impl CocoGitto {
         self.bump_packages(pre_release, hooks_config, &bumps)?;
 
         let sign = self.repository.gpg_sign();
-        self.repository
-            .commit("chore(version): bump packages", sign)?;
+
+        let skip_ci_pattern = skip_ci.unwrap_or(SETTINGS.skip_ci.clone().unwrap_or_default());
+
+        self.repository.commit(
+            &format!("chore(version): bump packages {}", skip_ci_pattern),
+            sign,
+        )?;
 
         for bump in &bumps {
             self.repository.create_tag(&bump.new_version.prefixed_tag)?;
@@ -131,6 +150,7 @@ impl CocoGitto {
         hooks_config: Option<&str>,
         annotated: Option<String>,
         dry_run: bool,
+        skip_ci: Option<String>,
     ) -> Result<()> {
         self.pre_bump_checks()?;
         // Get package bumps
@@ -227,8 +247,14 @@ impl CocoGitto {
         self.bump_packages(pre_release, hooks_config, &bumps)?;
 
         let sign = self.repository.gpg_sign();
+
+        let skip_ci_pattern = skip_ci.unwrap_or(SETTINGS.skip_ci.clone().unwrap_or_default());
+
         self.repository.commit(
-            &format!("chore(version): {}", next_version.prefixed_tag),
+            &format!(
+                "chore(version): {} {}",
+                next_version.prefixed_tag, skip_ci_pattern
+            ),
             sign,
         )?;
 
@@ -279,6 +305,7 @@ impl CocoGitto {
         hooks_config: Option<&str>,
         annotated: Option<String>,
         dry_run: bool,
+        skip_ci: Option<String>,
     ) -> Result<()> {
         self.pre_bump_checks()?;
         // Get package bumps
@@ -343,8 +370,13 @@ impl CocoGitto {
         self.unwrap_or_stash_and_exit(&tag, hook_result);
 
         let sign = self.repository.gpg_sign();
+        let skip_ci_pattern = skip_ci.unwrap_or(SETTINGS.skip_ci.clone().unwrap_or_default());
+
         self.repository.commit(
-            &format!("chore(version): {}", next_version.prefixed_tag),
+            &format!(
+                "chore(version): {} {}",
+                next_version.prefixed_tag, skip_ci_pattern
+            ),
             sign,
         )?;
 
diff --git a/src/command/bump/package.rs b/src/command/bump/package.rs
index b204907..6791051 100644
--- a/src/command/bump/package.rs
+++ b/src/command/bump/package.rs
@@ -15,6 +15,7 @@ use semver::Prerelease;
 use tera::Tera;
 
 impl CocoGitto {
+    #[allow(clippy::too_many_arguments)]
     pub fn create_package_version(
         &mut self,
         (package_name, package): (&str, &MonoRepoPackage),
@@ -23,6 +24,7 @@ impl CocoGitto {
         hooks_config: Option<&str>,
         annotated: Option<String>,
         dry_run: bool,
+        skip_ci: Option<String>,
     ) -> Result<()> {
         self.pre_bump_checks()?;
 
@@ -82,8 +84,11 @@ impl CocoGitto {
         self.unwrap_or_stash_and_exit(&tag, hook_result);
 
         let sign = self.repository.gpg_sign();
+
+        let skip_ci_pattern = skip_ci.unwrap_or(SETTINGS.skip_ci.clone().unwrap_or_default());
+
         self.repository
-            .commit(&format!("chore(version): {tag}"), sign)?;
+            .commit(&format!("chore(version): {tag} {}", skip_ci_pattern), sign)?;
 
         if let Some(msg_tmpl) = annotated {
             let mut context = tera::Context::new();
diff --git a/src/command/bump/standard.rs b/src/command/bump/standard.rs
index 6427c59..4e8d17f 100644
--- a/src/command/bump/standard.rs
+++ b/src/command/bump/standard.rs
@@ -21,6 +21,7 @@ impl CocoGitto {
         hooks_config: Option<&str>,
         annotated: Option<String>,
         dry_run: bool,
+        skip_ci: Option<String>,
     ) -> Result<()> {
         self.pre_bump_checks()?;
 
@@ -70,8 +71,13 @@ impl CocoGitto {
 
         let sign = self.repository.gpg_sign();
 
+        let skip_ci_pattern = skip_ci.unwrap_or(SETTINGS.skip_ci.clone().unwrap_or_default());
+
         self.repository.commit(
-            &format!("chore(version): {}", next_version.prefixed_tag),
+            &format!(
+                "chore(version): {} {}",
+                next_version.prefixed_tag, skip_ci_pattern
+            ),
             sign,
         )?;
 
diff --git a/src/conventional/commit.rs b/src/conventional/commit.rs
index 4be76fc..f3b5378 100644
--- a/src/conventional/commit.rs
+++ b/src/conventional/commit.rs
@@ -1,7 +1,7 @@
 use std::cmp::Ordering;
 use std::fmt::{self, Formatter};
 
-use crate::conventional::error::ConventionalCommitError;
+pub use crate::conventional::error::ConventionalCommitError;
 use crate::SETTINGS;
 use chrono::{NaiveDateTime, Utc};
 use colored::*;
diff --git a/src/conventional/error.rs b/src/conventional/error.rs
index f27474d..aed18f0 100644
--- a/src/conventional/error.rs
+++ b/src/conventional/error.rs
@@ -6,7 +6,7 @@ use serde::de::StdError;
 use std::fmt;
 use std::fmt::{Display, Formatter};
 
-#[derive(Debug)]
+#[derive(Debug, Clone)]
 pub enum ConventionalCommitError {
     CommitFormat {
         oid: String,
diff --git a/src/git/revspec.rs b/src/git/revspec.rs
index c93904d..88f3616 100644
--- a/src/git/revspec.rs
+++ b/src/git/revspec.rs
@@ -2,7 +2,7 @@ use std::fmt;
 use std::fmt::Formatter;
 use std::str::FromStr;
 
-use git2::{Commit, ErrorCode, Oid};
+use git2::{Commit, DescribeFormatOptions, DescribeOptions, ErrorCode, Oid};
 
 use crate::conventional::changelog::release::Release;
 use crate::git::error::Git2Error;
@@ -347,46 +347,12 @@ impl Repository {
     fn get_latest_tag_starting_from(&self, starting_point: Oid) -> Result<Tag, Git2Error> {
         let starting_point = self.0.find_commit(starting_point)?;
         let starting_point = starting_point.parent(0)?;
-        let first_commit = self.get_first_commit()?;
-        let mut revwalk = self.0.revwalk()?;
-        let range = format!("{}..{}", first_commit, starting_point.id());
-
-        revwalk.push_range(&range)?;
-        let mut range = vec![];
-        for oid in revwalk {
-            range.push(oid?);
-        }
-
-        let mut tags = vec![];
-        self.0
-            .tag_foreach(|mut oid, name| {
-                let name = String::from_utf8_lossy(name);
-                let name = name.as_ref().strip_prefix("refs/tags/").unwrap();
-
-                // If this is an annotated tag, find the first parent commit
-                if self.0.revparse_single(name).unwrap().as_commit().is_none() {
-                    if let Some(commit) = self
-                        .0
-                        .revparse_single([name, "^{}"].concat().as_str())
-                        .unwrap()
-                        .as_commit()
-                    {
-                        oid = commit.id();
-                    }
-                };
-
-                if range.contains(&oid) {
-                    if let Ok(tag) = Tag::from_str(name, Some(oid)) {
-                        tags.push(tag);
-                    };
-                };
-                true
-            })
-            .expect("Unable to walk tags");
-
-        let latest_tag: Option<Tag> = tags.into_iter().max();
-
-        latest_tag.ok_or(Git2Error::NoTagFound)
+        let describe = starting_point
+            .as_object()
+            .describe(DescribeOptions::new().describe_tags())?;
+        let tag_name = describe.format(Some(DescribeFormatOptions::new().abbreviated_size(0)))?;
+        let tag_oid = self.0.refname_to_id(&format!("refs/tags/{tag_name}")).ok();
+        Tag::from_str(&tag_name, tag_oid).map_err(|_| Git2Error::NoTagFound)
     }
 }
 
diff --git a/src/settings/error.rs b/src/settings/error.rs
index b531e48..c12283a 100644
--- a/src/settings/error.rs
+++ b/src/settings/error.rs
@@ -3,7 +3,7 @@ use serde::de::StdError;
 use std::fmt::{Debug, Display, Formatter};
 
 #[derive(Debug)]
-pub(crate) struct SettingError(config::ConfigError);
+pub struct SettingError(config::ConfigError);
 
 impl Display for SettingError {
     fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
diff --git a/src/settings/mod.rs b/src/settings/mod.rs
index 21de236..c0fa1a1 100644
--- a/src/settings/mod.rs
+++ b/src/settings/mod.rs
@@ -11,7 +11,7 @@ use crate::conventional::changelog::error::ChangelogError;
 use crate::conventional::changelog::template::{RemoteContext, Template};
 use crate::hook::Hooks;
 use crate::settings::error::SettingError;
-use config::{Config, File};
+use config::{Config, File, FileFormat};
 use conventional_commit_parser::commit::CommitType;
 use serde::{Deserialize, Serialize};
 use std::path::Path;
@@ -36,6 +36,7 @@ pub struct Settings {
     pub monorepo_version_separator: Option<String>,
     pub branch_whitelist: Vec<String>,
     pub tag_prefix: Option<String>,
+    pub skip_ci: Option<String>,
     pub pre_bump_hooks: Vec<String>,
     pub post_bump_hooks: Vec<String>,
     pub pre_package_bump_hooks: Vec<String>,
@@ -56,6 +57,7 @@ impl Default for Settings {
             monorepo_version_separator: None,
             branch_whitelist: vec![],
             tag_prefix: None,
+            skip_ci: None,
             pre_bump_hooks: vec![],
             post_bump_hooks: vec![],
             pre_package_bump_hooks: vec![],
@@ -264,23 +266,10 @@ pub struct BumpProfile {
 
 impl Settings {
     // Fails only if config exists and is malformed
-    pub(crate) fn get(repository: &Repository) -> Result<Self, SettingError> {
-        match repository.get_repo_dir() {
-            Some(repo_path) => {
-                let settings_path = repo_path.join(CONFIG_PATH);
-                if settings_path.exists() {
-                    Config::builder()
-                        .add_source(File::from(settings_path))
-                        .build()
-                        .map_err(SettingError::from)?
-                        .try_deserialize()
-                        .map_err(SettingError::from)
-                } else {
-                    Ok(Settings::default())
-                }
-            }
-            None => Ok(Settings::default()),
-        }
+    pub(crate) fn get<T: TryInto<Settings, Error = SettingError>>(
+        repository: T,
+    ) -> Result<Self, SettingError> {
+        repository.try_into()
     }
 
     pub fn commit_types(&self) -> CommitsMetadata {
@@ -415,3 +404,43 @@ impl Hooks for MonoRepoPackage {
             .unwrap_or(&SETTINGS.post_package_bump_hooks)
     }
 }
+
+impl TryFrom<String> for Settings {
+    type Error = SettingError;
+
+    fn try_from(value: String) -> Result<Self, Self::Error> {
+        if value.is_empty() {
+            Ok(Settings::default())
+        } else {
+            Config::builder()
+                .add_source(File::from_str(&value, FileFormat::Toml))
+                .build()
+                .map_err(SettingError::from)?
+                .try_deserialize()
+                .map_err(SettingError::from)
+        }
+    }
+}
+
+impl TryFrom<&Repository> for Settings {
+    type Error = SettingError;
+
+    fn try_from(repo: &Repository) -> Result<Self, Self::Error> {
+        match repo.get_repo_dir() {
+            Some(repo_path) => {
+                let settings_path = repo_path.join(CONFIG_PATH);
+                if settings_path.exists() {
+                    Config::builder()
+                        .add_source(File::from(settings_path))
+                        .build()
+                        .map_err(SettingError::from)?
+                        .try_deserialize()
+                        .map_err(SettingError::from)
+                } else {
+                    Ok(Settings::default())
+                }
+            }
+            None => Ok(Settings::default()),
+        }
+    }
+}


Test patch:
diff --git a/tests/lib_tests/bump.rs b/tests/lib_tests/bump.rs
index d3037f6..77a1f9f 100644
--- a/tests/lib_tests/bump.rs
+++ b/tests/lib_tests/bump.rs
@@ -21,7 +21,7 @@ fn bump_ok() -> Result<()> {
     let mut cocogitto = CocoGitto::get()?;
 
     // Act
-    let result = cocogitto.create_version(IncrementCommand::Auto, None, None, None, false);
+    let result = cocogitto.create_version(IncrementCommand::Auto, None, None, None, false, None);
 
     // Assert
     assert_that!(result).is_ok();
@@ -47,6 +47,7 @@ fn annotated_bump_ok() -> Result<()> {
         None,
         Some(String::from("Release version {{version}}")),
         false,
+        None,
     );
 
     // Assert
@@ -68,7 +69,8 @@ fn monorepo_bump_ok() -> Result<()> {
     let mut cocogitto = CocoGitto::get()?;
 
     // Act
-    let result = cocogitto.create_monorepo_version(IncrementCommand::Auto, None, None, None, false);
+    let result =
+        cocogitto.create_monorepo_version(IncrementCommand::Auto, None, None, None, false, None);
 
     // Assert
     assert_that!(result).is_ok();
@@ -93,7 +95,7 @@ fn monorepo_bump_manual_ok() -> Result<()> {
 
     // Act
     let result =
-        cocogitto.create_monorepo_version(IncrementCommand::Major, None, None, None, false);
+        cocogitto.create_monorepo_version(IncrementCommand::Major, None, None, None, false, None);
 
     // Assert
     assert_that!(result).is_ok();
@@ -114,7 +116,8 @@ fn monorepo_with_tag_prefix_bump_ok() -> Result<()> {
     let mut cocogitto = CocoGitto::get()?;
 
     // Act
-    let result = cocogitto.create_monorepo_version(IncrementCommand::Auto, None, None, None, false);
+    let result =
+        cocogitto.create_monorepo_version(IncrementCommand::Auto, None, None, None, false, None);
 
     // Assert
     assert_that!(result).is_ok();
@@ -142,6 +145,7 @@ fn package_bump_ok() -> Result<()> {
         None,
         None,
         false,
+        None,
     );
 
     // Assert
@@ -209,6 +213,7 @@ fn consecutive_package_bump_ok() -> Result<()> {
         None,
         None,
         false,
+        None,
     )?;
 
     cocogitto.create_package_version(
@@ -218,6 +223,7 @@ fn consecutive_package_bump_ok() -> Result<()> {
         None,
         None,
         false,
+        None,
     )?;
 
     run_cmd!(
@@ -233,6 +239,7 @@ fn consecutive_package_bump_ok() -> Result<()> {
         None,
         None,
         false,
+        None,
     )?;
 
     // Assert
@@ -254,7 +261,7 @@ fn should_fallback_to_0_0_0_when_there_is_no_tag() -> Result<()> {
     let mut cocogitto = CocoGitto::get()?;
 
     // Act
-    let result = cocogitto.create_version(IncrementCommand::Auto, None, None, None, false);
+    let result = cocogitto.create_version(IncrementCommand::Auto, None, None, None, false, None);
 
     // Assert
     assert_that!(result).is_ok();
@@ -313,7 +320,7 @@ fn auto_bump_package_only_ok() -> Result<()> {
     let mut cocogitto = CocoGitto::get()?;
 
     // Act
-    cocogitto.create_all_package_version_auto(None, None, false)?;
+    cocogitto.create_all_package_version_auto(None, None, false, None)?;
 
     assert_tag_exists("jenkins-0.1.0")?;
     assert_tag_exists("thumbor-0.1.0")?;
@@ -325,7 +332,7 @@ fn auto_bump_package_only_ok() -> Result<()> {
         git commit -m "fix(jenkins): bug fix on jenkins package";
     )?;
 
-    cocogitto.create_all_package_version_auto(None, None, false)?;
+    cocogitto.create_all_package_version_auto(None, None, false, None)?;
 
     // Assert
     assert_tag_exists("jenkins-0.1.1")?;
@@ -377,7 +384,7 @@ fn bump_with_whitelisted_branch_ok() -> Result<()> {
     let mut cocogitto = CocoGitto::get()?;
 
     // Act
-    let result = cocogitto.create_version(IncrementCommand::Auto, None, None, None, false);
+    let result = cocogitto.create_version(IncrementCommand::Auto, None, None, None, false, None);
 
     // Assert
     assert_that!(result).is_ok();
@@ -402,7 +409,7 @@ fn bump_with_whitelisted_branch_fails() -> Result<()> {
     let mut cocogitto = CocoGitto::get()?;
 
     // Act
-    let result = cocogitto.create_version(IncrementCommand::Auto, None, None, None, false);
+    let result = cocogitto.create_version(IncrementCommand::Auto, None, None, None, false, None);
 
     // Assert
     assert_that!(result.unwrap_err().to_string()).is_equal_to(
@@ -431,7 +438,7 @@ fn bump_with_whitelisted_branch_pattern_ok() -> Result<()> {
     let mut cocogitto = CocoGitto::get()?;
 
     // Act
-    let result = cocogitto.create_version(IncrementCommand::Auto, None, None, None, false);
+    let result = cocogitto.create_version(IncrementCommand::Auto, None, None, None, false, None);
 
     // Assert
     assert_that!(result).is_ok();
@@ -456,7 +463,7 @@ fn bump_with_whitelisted_branch_pattern_err() -> Result<()> {
     let mut cocogitto = CocoGitto::get()?;
 
     // Act
-    let result = cocogitto.create_version(IncrementCommand::Auto, None, None, None, false);
+    let result = cocogitto.create_version(IncrementCommand::Auto, None, None, None, false, None);
 
     // Assert
     assert_that!(result).is_err();
@@ -513,7 +520,7 @@ fn bump_no_error_should_be_thrown_on_only_chore_docs_commit() -> Result<()> {
     let mut cocogitto = CocoGitto::get()?;
 
     // Act
-    cocogitto.create_monorepo_version(IncrementCommand::Auto, None, None, None, false)?;
+    cocogitto.create_monorepo_version(IncrementCommand::Auto, None, None, None, false, None)?;
 
     run_cmd!(
         echo "chore on jenkins" > jenkins/fix;
@@ -524,7 +531,7 @@ fn bump_no_error_should_be_thrown_on_only_chore_docs_commit() -> Result<()> {
         git commit -m "docs(jenkins): jenkins docs";
     )?;
 
-    cocogitto.create_monorepo_version(IncrementCommand::Auto, None, None, None, false)?;
+    cocogitto.create_monorepo_version(IncrementCommand::Auto, None, None, None, false, None)?;
 
     cocogitto.create_package_version(
         ("jenkins", &jenkins()),
@@ -533,6 +540,7 @@ fn bump_no_error_should_be_thrown_on_only_chore_docs_commit() -> Result<()> {
         None,
         None,
         false,
+        None,
     )?;
 
     run_cmd!(
@@ -541,7 +549,7 @@ fn bump_no_error_should_be_thrown_on_only_chore_docs_commit() -> Result<()> {
         git commit -m "feat(thumbor): more feat on thumbor";
     )?;
 
-    cocogitto.create_monorepo_version(IncrementCommand::Auto, None, None, None, false)?;
+    cocogitto.create_monorepo_version(IncrementCommand::Auto, None, None, None, false, None)?;
 
     // Assert
     assert_tag_exists("jenkins-0.1.0")?;
@@ -582,7 +590,8 @@ fn error_on_no_conventionnal_commits_found_for_monorepo() -> Result<()> {
     let mut cocogitto = CocoGitto::get()?;
 
     // Act
-    let first_result = cocogitto.create_version(IncrementCommand::Auto, None, None, None, false);
+    let first_result =
+        cocogitto.create_version(IncrementCommand::Auto, None, None, None, false, None);
 
     // Assert
     assert_that!(first_result).is_ok();
@@ -595,7 +604,8 @@ fn error_on_no_conventionnal_commits_found_for_monorepo() -> Result<()> {
     git_commit("second unconventional feature commit")?;
 
     // Act
-    let second_result = cocogitto.create_version(IncrementCommand::Auto, None, None, None, false);
+    let second_result =
+        cocogitto.create_version(IncrementCommand::Auto, None, None, None, false, None);
 
     // Assert
     assert_that!(second_result).is_err();
@@ -648,6 +658,7 @@ fn error_on_no_conventionnal_commits_found_for_package() -> Result<()> {
         None,
         None,
         false,
+        None,
     );
 
     assert_that!(first_result).is_ok();
@@ -665,6 +676,7 @@ fn error_on_no_conventionnal_commits_found_for_package() -> Result<()> {
         None,
         None,
         false,
+        None,
     );
 
     assert_that!(second_result).is_err();
@@ -721,7 +733,8 @@ fn bump_with_unconventionnal_and_conventional_commits_found_for_packages() -> Re
     let mut cocogitto = CocoGitto::get()?;
 
     // Act
-    let result = cocogitto.create_monorepo_version(IncrementCommand::Auto, None, None, None, false);
+    let result =
+        cocogitto.create_monorepo_version(IncrementCommand::Auto, None, None, None, false, None);
 
     // Assert
     assert_that!(result).is_ok();