feat(bitbucket): Deprecate App password and replace it with API token

This commit is contained in:
Vlad Vladov
2025-09-05 02:52:47 +03:00
parent 39872720dd
commit e04e25385d
8 changed files with 126 additions and 66 deletions

View File

@@ -68,10 +68,17 @@ export const updateBitbucket = async (
input: typeof apiUpdateBitbucket._type,
) => {
return await db.transaction(async (tx) => {
// Explicitly omit credentials from updates for safety/back-compat
const {
apiToken: _ignoredApiToken,
appPassword: _ignoredAppPassword,
...safeInput
} = input as any;
const result = await tx
.update(bitbucket)
.set({
...input,
...safeInput,
})
.where(eq(bitbucket.bitbucketId, bitbucketId))
.returning();