-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor!: simplifying --git-history-mode naming/description (#54)
- Loading branch information
1 parent
12413ab
commit 6a9a603
Showing
10 changed files
with
71 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 0 additions & 15 deletions
15
end-to-end-tests/features/git_history_all_parents_mode.feature
This file was deleted.
Oops, something went wrong.
13 changes: 0 additions & 13 deletions
13
end-to-end-tests/features/git_history_first_parent_mode.feature
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
Feature: Specifies how commits are parsed, acceptable values are 'first' to parse only the first parent of merge commits, or 'all' to parse all parents. commit's are parsed for their Git commit messages. | ||
|
||
|
||
Scenario Outline: All the parents of merge commit's are parsed for their Git commit messages. | ||
Given the repository "<repository>" is cloned and checked out at the commit "<checkout_commit>". | ||
When the argument --from-commit-hash is provided as "<from_commit_hash>". | ||
And the argument --from-version is provided as "<from_version>". | ||
Then the returned version should be "<default_expected_version>". | ||
When the argument --history-mode is provided as "all". | ||
Then the returned version should be "<all_parents_expected_version>". | ||
|
||
|
||
Examples: | ||
| repository | checkout_commit | from_commit_hash | from_version | default_expected_version | all_parents_expected_version | | ||
| https://github.com/dcyou/resume.git | 9015044aba82dbe8aa0119bffd7ea73cad171dd0 | fe14480df04f76e6434d45c762ab087df41b8473 | 1.2.2 | 1.3.1 | 1.3.30 | | ||
|
||
|
||
Scenario Outline: Only the first parent of merge commit's are parsed for their Git commit messages. | ||
Given the repository "<repository>" is cloned and checked out at the commit "<checkout_commit>". | ||
When the argument --from-commit-hash is provided as "<from_commit_hash>". | ||
And the argument --from-version is provided as "<from_version>". | ||
And the argument --history-mode is provided as "first". | ||
Then the returned version should be "<expected_version>". | ||
|
||
|
||
Examples: | ||
| repository | checkout_commit | from_commit_hash | from_version | expected_version | | ||
| https://github.com/dcyou/resume.git | 9015044aba82dbe8aa0119bffd7ea73cad171dd0 | fe14480df04f76e6434d45c762ab087df41b8473 | 1.2.2 | 1.3.1 | | ||
|
||
|
||
Scenario Outline: Only the first parent of merge commit's are parsed for their Git commit messages, by default. | ||
Given the repository "<repository>" is cloned and checked out at the commit "<checkout_commit>". | ||
When the argument --from-commit-hash is provided as "<from_commit_hash>". | ||
And the argument --from-version is provided as "<from_version>". | ||
Then the returned version should be "<expected_version>". | ||
|
||
|
||
Examples: | ||
| repository | checkout_commit | from_commit_hash | from_version | expected_version | | ||
| https://github.com/dcyou/resume.git | 9015044aba82dbe8aa0119bffd7ea73cad171dd0 | fe14480df04f76e6434d45c762ab087df41b8473 | 1.2.2 | 1.3.1 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
use strum_macros::{Display, EnumString}; | ||
|
||
/// The mode to use when transversing the Git commit history of the Git commit range, to collect | ||
/// the Git commit messages to use in calculating the next semantic version. | ||
#[derive(Debug, PartialEq, Eq, Clone, Copy, Display, EnumString)] | ||
#[strum(ascii_case_insensitive)] | ||
pub enum HistoryMode { | ||
/// only the first parent of merge commit's are parsed | ||
First, | ||
/// all the parents of merge commit's are parsed | ||
All, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters