-
Notifications
You must be signed in to change notification settings - Fork 100
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add conditional merge configuration (#270)
* Rename Matches to MatchesAny * Remove comment * Add Signal type * Refactor Enabled method to use size * Refactor MatchesAny into several smaller functions * Add errors package * Add MatchesAll * Add conditional merge config * Add IsMergeMethodTriggered * Allow merge method to be overridden * Fix typo * Add better quick evaluation * Clarify comments * Remove TODOs * Add maxcommits logic * Ensure matches are updated * Validate body content and comments * Remove redundant checks * Ensure MaxCommits is counted correctly * Add tests for MaxCommits * Add merge_method docs * Allow merge_method to override branch_method * Fix typo * Use for loop * Move merge logic to DetermineMergeMethod * Add note about overriding branch_method * Remove SignalsMatches * Return a MergeMethod * Fix error where head is not defined * Refactor size method to return the count of non-zero value signals * Remove typo * Rename MergeMethods * Format golang * Update signatures in MatchesAny * Updates signatures in MatchesAll * Update all matches method signatures * Move all matching methods to use new logic * Use separate types for each signal * Add additional tests * Add Matches * Consistently use signal as the receiver name * Remove else clauses * Return directly in IsPRIgnored * Move logging * Move comments * Change signal methods to no longer use pointers * Wrap call to Match with a check that it is enabled * Remove logging * Add back indentation * Remove unused loggers * Fix readme comment * Fix logic * Return False for MatchesAll with no signals * Return false early for MatchesAny without any signals
- Loading branch information
1 parent
d4e4302
commit 6b1a69a
Showing
6 changed files
with
544 additions
and
51 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
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
Oops, something went wrong.