-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for multiple policy in on block event #857
Conversation
asafambar
commented
Jul 3, 2023
- All tests passed. If this feature is not already covered by the tests, I added new tests.
- All static analysis checks passed.
- This pull request is on the dev branch.
- I used gofmt for formatting the code before submitting the pull request.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will you be able to add a clear description to this PR, explaining what this feature is all about and what auto-merge
means?
I'd be happy ro review this PR again afterwards.
Description for PR: In order to show multi policies in a neat way in the table structure, I added the |
@@ -91,6 +92,36 @@ var DefaultMaxColWidth = 25 | |||
// ┌─────────────────────────┐ | |||
// │ No customers were found │ | |||
// └─────────────────────────┘ | |||
// | |||
// Example(auto-merge): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// Example(auto-merge): --> // Example (auto-merge):
policies = append(policies, Policy{Policy: strings.TrimSpace(pol), Condition: strings.TrimSpace(cond)}) | ||
} | ||
} | ||
return policies | ||
} | ||
|
||
// Adding a new line after the headline and replace every "|" with a new line. | ||
func makeLegiblePolicyDetails(explanation, recommendation string) (string, string) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's a unit test for this frunction.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have unit test for the function which using it, anyway, I can add dedicated one