• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

stacklok / codegate-ui / 13677312010

05 Mar 2025 01:38PM UTC coverage: 69.742% (-0.2%) from 69.903%
13677312010

Pull #350

github

web-flow
Merge c6944aca9 into 787519d42
Pull Request #350: chore(deps-dev): bump eslint from 9.18.0 to 9.21.0

421 of 669 branches covered (62.93%)

Branch coverage included in aggregate %.

879 of 1195 relevant lines covered (73.56%)

71.81 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/features/dashboard-messages/components/conversation-secrets-detected.tsx
1
import { Alert } from '@/api/generated'
2
import { ReactNode } from 'react'
3
import Markdown from 'react-markdown'
4

5
function ConversationSecretsList({ children }: { children: ReactNode }) {
6
  return <ul>{children}</ul>
7
}
8

9
function ConversationSecretsListItem({ children }: { children: ReactNode }) {
10
  return (
11
    <li className="mb-3 rounded border-b border-gray-200 pb-3 last:border-b-0">
12
      {children}
13
    </li>
14
  )
15
}
16

17
function formatTriggerString(string: string): string {
18
  return string.replace(/REDACTED<[^>]*?>/g, '**REDACTED**')
×
19
}
20

21
// NOTE: The secrets detection backend code appears to be returning fairly
22
// unstructured data with a lot of false positives. This is not actually
23
// referenced in the frontend yet.
24
export function ConversationSecretsDetected({ alerts }: { alerts: Alert[] }) {
25
  return (
26
    <ConversationSecretsList>
27
      {alerts.map((a) => {
28
        if (typeof a.trigger_string !== 'string') return null
×
29

30
        return (
31
          <ConversationSecretsListItem key={a.id}>
32
            <Markdown>{formatTriggerString(a.trigger_string)}</Markdown>
33
          </ConversationSecretsListItem>
34
        )
35
      })}
36
    </ConversationSecretsList>
37
  )
38
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc