Skip to content

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

No need to populate the defaultBranch name on creating the webhook since the webhook event contains the default branch info

天舟d82449f45180
diff --git a/frontend/src/components/RepositoryForm.vue b/frontend/src/components/RepositoryForm.vue
index 57450805ae..8ab9a890db 100644
--- a/frontend/src/components/RepositoryForm.vue
+++ b/frontend/src/components/RepositoryForm.vue
@@ -75,7 +75,7 @@
name="branch"
type="text"
class="textfield mt-2 w-full"
- placeholder="'Default branch (normally \'master\' or \'main\')'"
+ placeholder="Default branch (normally 'master' or 'main')"
v-model="repositoryConfig.branchFilter"
/>
<div v-if="vcsType == 'GITLAB_SELF_HOST'" class="mt-2 textinfolabel">
diff --git a/frontend/src/components/RepositorySetupWizard.vue b/frontend/src/components/RepositorySetupWizard.vue
index 5ab42ffb43..eaef5bcf86 100644
--- a/frontend/src/components/RepositorySetupWizard.vue
+++ b/frontend/src/components/RepositorySetupWizard.vue
@@ -86,7 +86,6 @@ export default {
name: "",
fullPath: "",
webURL: "",
- defaultBranch: "",
},
repositoryConfig: {
baseDirectory: "",
@@ -121,9 +120,7 @@ export default {
fullPath: state.config.repositoryInfo.fullPath,
webURL: state.config.repositoryInfo.webURL,
baseDirectory: state.config.repositoryConfig.baseDirectory,
- branchFilter: isEmpty(state.config.repositoryConfig.branchFilter)
- ? state.config.repositoryInfo.defaultBranch
- : state.config.repositoryConfig.branchFilter,
+ branchFilter: state.config.repositoryConfig.branchFilter,
externalId: state.config.repositoryInfo.externalId,
webhookId: webhook.id,
webhookURL: webhook.url,
diff --git a/frontend/src/store/modules/gitlab.ts b/frontend/src/store/modules/gitlab.ts
index 77059a3c8c..489ad3e31d 100644
--- a/frontend/src/store/modules/gitlab.ts
+++ b/frontend/src/store/modules/gitlab.ts
@@ -19,7 +19,6 @@ function convertGitLabProject(project: any): ExternalRepositoryInfo {
name: project.name,
fullPath: project.path_with_namespace,
webURL: project.web_url,
- defaultBranch: project.default_branch,
};
}
diff --git a/frontend/src/types/repository.ts b/frontend/src/types/repository.ts
index bba028cf36..ce5bb9d0b0 100644
--- a/frontend/src/types/repository.ts
+++ b/frontend/src/types/repository.ts
@@ -59,8 +59,6 @@ export type ExternalRepositoryInfo = {
fullPath: string;
// e.g. http://gitlab.bytebase.com/bytebase/sample-project
webURL: string;
- // e.g. master
- defaultBranch: string;
};
export type WebhookInfo = {