mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-10 03:28:43 +00:00
Improve teardown
This commit is contained in:
+5
@@ -38,6 +38,7 @@ import {
|
||||
TBitbucketDataSourceWithConnection,
|
||||
TQueueBitbucketResourceDiffScan
|
||||
} from "./bitbucket-secret-scanning-types";
|
||||
import { logger } from "@app/lib/logger";
|
||||
|
||||
export const BitbucketSecretScanningFactory = () => {
|
||||
const initialize: TSecretScanningFactoryInitialize<
|
||||
@@ -116,6 +117,7 @@ export const BitbucketSecretScanningFactory = () => {
|
||||
|
||||
const authHeader = `Basic ${Buffer.from(`${email}:${apiToken}`).toString("base64")}`;
|
||||
|
||||
try {
|
||||
await request.delete(
|
||||
`${IntegrationUrls.BITBUCKET_API_URL}/2.0/workspaces/${config.workspaceSlug}/hooks/${webhookId}`,
|
||||
{
|
||||
@@ -125,6 +127,9 @@ export const BitbucketSecretScanningFactory = () => {
|
||||
}
|
||||
}
|
||||
);
|
||||
} catch (err) {
|
||||
logger.error(`teardown: Bitbucket - Failed to call delete on webhook [webhookId=${webhookId}]`);
|
||||
}
|
||||
};
|
||||
|
||||
const listRawResources: TSecretScanningFactoryListRawResources<TBitbucketDataSourceWithConnection> = async (
|
||||
|
||||
Reference in New Issue
Block a user