-
Notifications
You must be signed in to change notification settings - Fork 138
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor, botreview: align result structs into one (#3120)
* refactor, botreview: align result structs into one There was lots of duplication wrt storing review result data, i.e. there was a struct specialized holding the result data per review strategy. This was unnecessary since all these were doing the same thing, like storing hunks that were special and storing whether the result would be mergable right away. These structs all have been replaced by the `BasicReviewResult` struct that is used for every review strategy now. Furthermore the review itself and the result interface and implementation have been moved to their own file. Signed-off-by: Daniel Hiller <dhiller@redhat.com> * refactor, botreview: remove CanMerge func and field Since the sole presence of a `ShouldNotMergeReason` tells whether a pull request can get merged, the `CanMerge` func and fields are redundant. Therefore they have been completely removed. Signed-off-by: Daniel Hiller <dhiller@redhat.com> * fix, botreview: append only non empty strings ShouldNotMergeReason will be empty string by default, thus we need to check before adding, or we will hold every PR. Signed-off-by: Daniel Hiller <dhiller@redhat.com> * fix, bazel: update build file Signed-off-by: Daniel Hiller <dhiller@redhat.com> --------- Signed-off-by: Daniel Hiller <dhiller@redhat.com>
- Loading branch information
Showing
9 changed files
with
155 additions
and
198 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
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.