Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

chore: remove branch (#15244)

boojackad789cb244d0
diff --git a/frontend/src/components/Plan/logic/initialize/create.ts b/frontend/src/components/Plan/logic/initialize/create.ts
index c2966aa5d9..6b79c1426c 100644
--- a/frontend/src/components/Plan/logic/initialize/create.ts
+++ b/frontend/src/components/Plan/logic/initialize/create.ts
@@ -43,7 +43,6 @@ type CreatePlanParams = {
project: ComposedProject;
query: Record<string, string>;
initialSQL: InitialSQL;
- branch?: string;
};
const state = {
diff --git a/frontend/src/components/Role/Setting/components/ImportPermissionFromRoleModal.vue b/frontend/src/components/Role/Setting/components/ImportPermissionFromRoleModal.vue
index 667df37b3b..936ab6ee9d 100644
--- a/frontend/src/components/Role/Setting/components/ImportPermissionFromRoleModal.vue
+++ b/frontend/src/components/Role/Setting/components/ImportPermissionFromRoleModal.vue
@@ -79,11 +79,7 @@ const selectedRole = computed(() => {
});
const filterDisplayPermissions = computed(() => {
- return (
- selectedRole.value?.permissions.filter(
- (p) => !p.startsWith("bb.branches") // Filter branch related permissions.
- ) || []
- );
+ return selectedRole.value?.permissions || [];
});
const allowConfirm = computed(() => {
diff --git a/frontend/src/components/Role/Setting/components/RolePanel.vue b/frontend/src/components/Role/Setting/components/RolePanel.vue
index a33993fde7..35251460e2 100644
--- a/frontend/src/components/Role/Setting/components/RolePanel.vue
+++ b/frontend/src/components/Role/Setting/components/RolePanel.vue
@@ -159,12 +159,10 @@ const resourceId = computed({
});
const permissionOptions = computed(() => {
- return PERMISSIONS.sort()
- .filter((p) => !p.startsWith("bb.branches")) // Filter branch related permissions.
- .map((p) => ({
- label: displayPermissionTitle(p),
- value: p,
- }));
+ return PERMISSIONS.sort().map((p) => ({
+ label: displayPermissionTitle(p),
+ value: p,
+ }));
});
const allowSave = computed(() => {
diff --git a/frontend/src/store/modules/v1/common.ts b/frontend/src/store/modules/v1/common.ts
index cf05ed3668..4061a68512 100644
--- a/frontend/src/store/modules/v1/common.ts
+++ b/frontend/src/store/modules/v1/common.ts
@@ -19,7 +19,6 @@ export const vcsConnectorPrefix = "vcsConnectors/";
export const logNamePrefix = "logs/";
export const issueNamePrefix = "issues/";
export const secretNamePrefix = "secrets/";
-export const branchNamePrefix = "branches/";
export const ssoNamePrefix = "idps/";
export const issueCommentNamePrefix = "issueComments/";
export const groupNamePrefix = "groups/";
@@ -105,15 +104,6 @@ export const getWorksheetId = (name: string): string => {
return tokens[0];
};
-export const getProjectAndBranchId = (name: string): string[] => {
- const branchRegex = /^projects\/([^/]+)\/branches\/(.+)$/;
- const matches = name.match(branchRegex);
- if (!matches || matches.length != 3) {
- return ["", ""];
- }
- return [matches[1], matches[2]];
-};
-
export const getInstanceId = (name: string): string[] => {
const tokens = getNameParentTokens(name, [instanceNamePrefix]);
if (tokens.length !== 1) {
diff --git a/frontend/src/types/iam/permission.ts b/frontend/src/types/iam/permission.ts
index c609da21ff..bbcc8f6aa4 100644
--- a/frontend/src/types/iam/permission.ts
+++ b/frontend/src/types/iam/permission.ts
@@ -3,12 +3,6 @@ import type { PickLiteral } from "../utils";
export type Permission =
| "bb.auditLogs.export"
| "bb.auditLogs.search"
- | "bb.branches.admin"
- | "bb.branches.create"
- | "bb.branches.delete"
- | "bb.branches.get"
- | "bb.branches.list"
- | "bb.branches.update"
| "bb.changelists.create"
| "bb.changelists.delete"
| "bb.changelists.get"
diff --git a/frontend/src/types/v1/changelist.ts b/frontend/src/types/v1/changelist.ts
index c303bcc1c8..23ab9483a3 100644
--- a/frontend/src/types/v1/changelist.ts
+++ b/frontend/src/types/v1/changelist.ts
@@ -11,11 +11,7 @@ export const unknownChangelist = () => {
});
};
-export const Changelist_Change_Source_List = [
- "CHANGELOG",
- "BRANCH",
- "RAW_SQL",
-] as const;
+export const Changelist_Change_Source_List = ["CHANGELOG", "RAW_SQL"] as const;
export type Changelist_Change_Source =
(typeof Changelist_Change_Source_List)[number];
diff --git a/frontend/src/types/v1/schemaEditor/state.ts b/frontend/src/types/v1/schemaEditor/state.ts
index 021e5294cc..a0f89cc4cb 100644
--- a/frontend/src/types/v1/schemaEditor/state.ts
+++ b/frontend/src/types/v1/schemaEditor/state.ts
@@ -19,7 +19,7 @@ export interface DatabaseTabContext {
export interface TableTabContext {
id: string;
type: SchemaEditorTabType.TabForTable;
- // Parent could be a database or a branch.
+ // Parent could be a database.
parentName: string;
schemaId: string;
tableId: string;