mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-07 14:27:30 +00:00
only send risk notif when risks are found
This commit is contained in:
@@ -129,6 +129,7 @@ export default async (app: Probot) => {
|
|||||||
const adminOrOwnerEmails = userEmails.map(userObject => userObject.email)
|
const adminOrOwnerEmails = userEmails.map(userObject => userObject.email)
|
||||||
|
|
||||||
const usersToNotify = pusher?.email ? [pusher.email, ...adminOrOwnerEmails] : [...adminOrOwnerEmails]
|
const usersToNotify = pusher?.email ? [pusher.email, ...adminOrOwnerEmails] : [...adminOrOwnerEmails]
|
||||||
|
if (Object.keys(allFindingsByFingerprint).length) {
|
||||||
await sendMail({
|
await sendMail({
|
||||||
template: "secretLeakIncident.handlebars",
|
template: "secretLeakIncident.handlebars",
|
||||||
subjectLine: `Incident alert: leaked secrets found in Github repository ${repository.full_name}`,
|
subjectLine: `Incident alert: leaked secrets found in Github repository ${repository.full_name}`,
|
||||||
@@ -139,6 +140,7 @@ export default async (app: Probot) => {
|
|||||||
pusher_name: pusher.name
|
pusher_name: pusher.name
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
const postHogClient = await TelemetryService.getPostHogClient();
|
const postHogClient = await TelemetryService.getPostHogClient();
|
||||||
if (postHogClient) {
|
if (postHogClient) {
|
||||||
|
|||||||
Reference in New Issue
Block a user