File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -221,10 +221,18 @@ func convertAuditLog(dblog database.GetAuditLogsOffsetRow) codersdk.AuditLog {
221
221
}
222
222
223
223
func auditLogDescription (alog database.GetAuditLogsOffsetRow ) string {
224
- return fmt .Sprintf ("{user} %s %s {target} " ,
224
+ str := fmt .Sprintf ("{user} %s %s" ,
225
225
codersdk .AuditAction (alog .Action ).FriendlyString (),
226
226
codersdk .ResourceType (alog .ResourceType ).FriendlyString (),
227
227
)
228
+
229
+ // We don't display the name for git ssh keys. It's fairly long and doesn't
230
+ // make too much sense to display.
231
+ if alog .ResourceType != database .ResourceTypeGitSshKey {
232
+ str += " {target}"
233
+ }
234
+
235
+ return str
228
236
}
229
237
230
238
// auditSearchQuery takes a query string and returns the auditLog filter.
You can’t perform that action at this time.
0 commit comments