Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
fix: support branch id with slash (#9716)
Danny Xu94f9ef9d620f
diff --git a/frontend/src/store/modules/v1/common.ts b/frontend/src/store/modules/v1/common.tsindex f17c5b5d94..542c5125e4 100644--- a/frontend/src/store/modules/v1/common.ts+++ b/frontend/src/store/modules/v1/common.ts@@ -80,16 +80,12 @@ export const getProjectAndSheetId = (name: string): string[] => {};export const getProjectAndBranchId = (name: string): string[] => {- const tokens = getNameParentTokens(name, [- projectNamePrefix,- branchNamePrefix,- ]);-- if (tokens.length != 2) {+ const branchRegex = /^projects\/([^/]+)\/branches\/(.+)$/;+ const matches = name.match(branchRegex);+ if (!matches || matches.length != 3) {return ["", ""];}-- return tokens;+ return [matches[1], matches[2]];};export const getInstanceAndDatabaseId = (name: string): string[] => {