Skip to content

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

Cleanup some TODO

天舟b8056644e531
diff --git a/api/issue.go b/api/issue.go
index e16399af9e..ee23819d9b 100644
--- a/api/issue.go
+++ b/api/issue.go
@@ -123,8 +123,7 @@ type IssueFind struct {
// Domain specific fields
PipelineId *int
- // Find issue where principalId is either creator or assignee
- // TODO: Add subscriber support
+ // Find issue where principalId is either creator, assignee or subscriber
PrincipalId *int
}
diff --git a/frontend/src/bbkit/BBNotification.vue b/frontend/src/bbkit/BBNotification.vue
index 3aa5f5b61b..da0de3ca3f 100644
--- a/frontend/src/bbkit/BBNotification.vue
+++ b/frontend/src/bbkit/BBNotification.vue
@@ -7,7 +7,6 @@
v-for="(notification, index) of notificationList.slice().reverse()"
:key="index"
>
- <!-- TODO: Needs to figure out how to do transition -->
<!--
Notification panel, show/hide based on alert state.
diff --git a/frontend/src/components/DatabaseSelect.vue b/frontend/src/components/DatabaseSelect.vue
index 78a8689fc9..5f6ce9e594 100644
--- a/frontend/src/components/DatabaseSelect.vue
+++ b/frontend/src/components/DatabaseSelect.vue
@@ -88,9 +88,8 @@ export default {
);
const prepareDatabaseList = () => {
- // TODO: need to revisit this, instead of fetching each time,
- // we maybe able to let the outside context to provide the database list
- // and we just do a get here.
+ // TODO(tianzhou): Instead of fetching each time, we maybe able to let the outside context
+ // to provide the database list and we just do a get here.
if (props.mode == "ENVIRONMENT" && props.environmentId != UNKNOWN_ID) {
store.dispatch(
"database/fetchDatabaseListByEnvironmentId",
diff --git a/frontend/src/components/MemberSelect.vue b/frontend/src/components/MemberSelect.vue
index 692989aee0..a461a3c669 100644
--- a/frontend/src/components/MemberSelect.vue
+++ b/frontend/src/components/MemberSelect.vue
@@ -12,7 +12,7 @@
"
>
<template v-slot:menuItem="{ item }">
- <!--TODO: Have to set a fixed width, otherwise the width would change based on the selected text.
+ <!--TODO(tianzhou): Have to set a fixed width, otherwise the width would change based on the selected text.
Likely, there is a better solution, while the author doesn't want to fight with CSS for now.
The specific value and breakpoint is to make it align with other select in the issue sidebar.
-->
@@ -22,7 +22,7 @@
</span>
</template>
<template v-slot:placeholder="{ placeholder }">
- <!--TODO: Have to set a fixed width, otherwise the width would change based on the selected text.
+ <!--TODO(tianzhou): Have to set a fixed width, otherwise the width would change based on the selected text.
Likely, there is a better solution, while the author doesn't want to fight with CSS for now.
The specific value and breakpoint is to make it align with other select in the issue sidebar.
-->
diff --git a/frontend/src/main.ts b/frontend/src/main.ts
index 1f026ff885..3b997ddded 100644
--- a/frontend/src/main.ts
+++ b/frontend/src/main.ts
@@ -134,7 +134,7 @@ axios.interceptors.response.use(
}
);
-// TODO: A global hook to collect errors to a central service
+// A global hook to collect errors to a central service
// app.config.errorHandler = function (err, vm, info) {
// };
diff --git a/frontend/src/router/index.ts b/frontend/src/router/index.ts
index aa87031c68..50c7155190 100644
--- a/frontend/src/router/index.ts
+++ b/frontend/src/router/index.ts
@@ -48,13 +48,14 @@ const routes: Array<RouteRecordRaw> = [
component: Signup,
props: true,
},
- {
- path: "activate",
- name: ACTIVATE_MODULE,
- meta: { title: () => "Activate" },
- component: Activate,
- props: true,
- },
+ // TODO(tianzhou): Disable activate page for now, requires implementing invite
+ // {
+ // path: "activate",
+ // name: ACTIVATE_MODULE,
+ // meta: { title: () => "Activate" },
+ // component: Activate,
+ // props: true,
+ // },
{
path: "password-reset",
name: PASSWORD_RESET_MODULE,
@@ -666,7 +667,7 @@ router.beforeEach((to, from, next) => {
if (to.name === ACTIVATE_MODULE) {
const token = to.query.token;
if (token) {
- // TODO: Needs to validate the token
+ // TODO(tianzhou): Needs to validate the activate token
next();
} else {
// Go to signup if token is missing
diff --git a/frontend/src/store/modules/gitlab.ts b/frontend/src/store/modules/gitlab.ts
index 26e6860108..6659d321af 100644
--- a/frontend/src/store/modules/gitlab.ts
+++ b/frontend/src/store/modules/gitlab.ts
@@ -103,7 +103,7 @@ const actions = {
// Saying that, delivering a souding dry run solution would be great and hopefully we can achieve that one day.
// merge_requests_events: true,
push_events_branch_filter: branchFilter,
- // TODO: Be lax for now
+ // TODO(tianzhou): Be lax to not enable_ssl_verification
enable_ssl_verification: false,
},
{
diff --git a/frontend/src/types/environment.ts b/frontend/src/types/environment.ts
index ba1d3238a9..0617d77697 100644
--- a/frontend/src/types/environment.ts
+++ b/frontend/src/types/environment.ts
@@ -1,8 +1,7 @@
import { RowStatus } from "./common";
-import { PrincipalId, EnvironmentId } from "./id";
+import { EnvironmentId } from "./id";
import { Principal } from "./principal";
-// TODO: Introduce an environment tier to explicitly define which environment is prod/staging/test etc
export type Environment = {
id: EnvironmentId;
diff --git a/frontend/src/views/DatabaseCreate.vue b/frontend/src/views/DatabaseCreate.vue
index b9cd27b3bd..b8c7599551 100644
--- a/frontend/src/views/DatabaseCreate.vue
+++ b/frontend/src/views/DatabaseCreate.vue
@@ -470,7 +470,7 @@ export default {
// If a valid issue id is provided, we will set the database output field
// if it's not set before. This is based on the assumption that user creates
// the database to fullfill that particular issue (e.g. completing the request db workflow)
- // TODO: If there is no applicable database field, we should also link the database to the issue.
+ // TODO(tianzhou): If there is no applicable database field, we should also link the database to the issue.
if (linkedIssue) {
const template = templateForType(linkedIssue.type);
if (template) {
diff --git a/frontend/src/views/IssueDetail.vue b/frontend/src/views/IssueDetail.vue
index 17bfb3d1cb..063b4216d6 100644
--- a/frontend/src/views/IssueDetail.vue
+++ b/frontend/src/views/IssueDetail.vue
@@ -787,7 +787,7 @@ export default {
});
const showIssueTaskRollbackStatementPanel = computed(() => {
- // TODO: disable it for now
+ // TODO(tianzhou): Disable rollback statement for now
return false;
//return issue.value.type == "bb.issue.database.schema.update";
});
diff --git a/frontend/src/views/IssueTaskStatementPanel.vue b/frontend/src/views/IssueTaskStatementPanel.vue
index 88ffd296fd..0938f59472 100644
--- a/frontend/src/views/IssueTaskStatementPanel.vue
+++ b/frontend/src/views/IssueTaskStatementPanel.vue
@@ -42,7 +42,6 @@
></textarea>
</template>
<!-- Margin value is to prevent flickering when switching between edit/non-edit mode -->
- <!-- TODO: There is still flickering between edit/non-edit mode depending on the line height -->
<div v-else style="margin-left: 5px; margin-top: 8.5px; margin-bottom: 31px">
<div v-if="state.editStatement" v-highlight class="whitespace-pre-wrap">
{{ state.editStatement }}
diff --git a/frontend/src/views/SettingWorkspaceMember.vue b/frontend/src/views/SettingWorkspaceMember.vue
index cc154b6816..0243788752 100644
--- a/frontend/src/views/SettingWorkspaceMember.vue
+++ b/frontend/src/views/SettingWorkspaceMember.vue
@@ -49,7 +49,7 @@ export default {
});
const allowAddOrInvite = computed(() => {
- // TODO: Enable for DBA and developer
+ // TODO(tianzhou): Implement invite mode for DBA and developer
// If current user is owner, MemberAddOrInvite is in Add mode.
// If current user is DBA or developer, MemberAddOrInvite is in Invite mode.
// For now, we only enable Add mode for owner
diff --git a/frontend/src/views/auth/Activate.vue b/frontend/src/views/auth/Activate.vue
index 44ef133d1a..ff5c18b6f9 100644
--- a/frontend/src/views/auth/Activate.vue
+++ b/frontend/src/views/auth/Activate.vue
@@ -51,8 +51,7 @@
focus:outline-none
focus:shadow-outline-blue
focus:border-control-border
- sm:text-sm
- sm:leading-5
+ sm:text-sm sm:leading-5
"
/>
</div>
@@ -83,8 +82,7 @@
focus:outline-none
focus:shadow-outline-blue
focus:border-control-border
- sm:text-sm
- sm:leading-5
+ sm:text-sm sm:leading-5
"
/>
</div>
@@ -126,7 +124,7 @@ export default {
const router = useRouter();
const token = router.currentRoute.value.query.token as string;
- // TODO: Get info from token
+ // TODO(tianzhou): Get info from activate token
const state = reactive<LocalState>({
password: "",
diff --git a/server/task.go b/server/task.go
index 1655858971..dc7ec370d6 100644
--- a/server/task.go
+++ b/server/task.go
@@ -197,7 +197,7 @@ func (s *Server) ChangeTaskStatusWithPatch(ctx context.Context, task *api.Task,
return nil, fmt.Errorf("failed to marshal activity after changing the task status: %v, err: %w", task.Name, err)
}
- // TODO: This indiciates a coupling that pipeline belongs to an issue.
+ // TODO(tianzhou): This indiciates a coupling that pipeline belongs to an issue.
// A better way is to implement this as an onTaskStatusChange callback
issueFind := &api.IssueFind{
PipelineId: &task.PipelineId,
diff --git a/server/webhook.go b/server/webhook.go
index 332c7ff66c..18c0f1ccdd 100644
--- a/server/webhook.go
+++ b/server/webhook.go
@@ -27,7 +27,6 @@ var (
func (s *Server) registerWebhookRoutes(g *echo.Group) {
g.POST("/gitlab/:id", func(c echo.Context) error {
var b []byte
- // TODO: We may save the raw event in the furture for async processing.
b, err := io.ReadAll(c.Request().Body)
if err != nil {
return echo.NewHTTPError(http.StatusBadRequest, "Failed to read webhook request").SetInternal(err)