Skip to content

Improve audit summary (type-to-count table) - #319

Merged
Zabuzard merged 1 commit into
developfrom
feature/improve_audit_summary
Dec 14, 2021
Merged

Zabuzard merged 1 commit into
developfrom
feature/improve_audit_summary

Conversation

@Zabuzard

@Zabuzard Zabuzard commented Dec 13, 2021 •

Copy link
Copy Markdown
Member

Overview

This is a small but nice improvement to the /audit command. Before the command lists all cases, it has a short summary message which, right now, goes like this:

There are 5 actions against the user.

This PR adds a table to this which lists all actions by action type with their respective count (sorted descending by count, filtered for count greater 0).

This is in particular useful for reviewing warnings (since we have this 3 warnings rule). Also, the way it is implemented now, it is also forwards compatible with new actions being added (in fact, warn isnt even added yet #249 ).

example

Note

The table is only present if there are any actions. Otherwise the code short-cuts to:

There are no actions against the user.

The PR also added some missing @NotNulls in the AuditCommand that I saw while editing, so dont be confused about those.

- and added some missing NotNulls in AuditCommand
@Zabuzard Zabuzard added enhance command Modify or improve an existing command or group of commands of the bot priority: low labels Dec 13, 2021
@Zabuzard Zabuzard added this to the Improvement phase 1 milestone Dec 13, 2021
@Zabuzard Zabuzard self-assigned this Dec 13, 2021
@Zabuzard
Zabuzard requested review from a team as code owners December 13, 2021 10:53
@sonarqubecloud

Copy link
Copy Markdown

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@Zabuzard
Zabuzard merged commit d69dcb8 into develop Dec 14, 2021
@Zabuzard
Zabuzard deleted the feature/improve_audit_summary branch December 14, 2021 11:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhance command Modify or improve an existing command or group of commands of the bot priority: low

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants