Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
chore: deprecate GroupValue in the approval node in the frontend (#15850)
ecmadao5b8fd919fb40
diff --git a/backend/api/v1/issue_service_convert.go b/backend/api/v1/issue_service_convert.goindex 5bd95e04e3..909934218a 100644--- a/backend/api/v1/issue_service_convert.go+++ b/backend/api/v1/issue_service_convert.go@@ -244,31 +244,27 @@ func convertToApprovalNode(node *storepb.ApprovalNode) *v1pb.ApprovalNode {v1node.Type = v1pb.ApprovalNode_Type(node.Type)switch payload := node.Payload.(type) {case *storepb.ApprovalNode_GroupValue_:- v1node.Payload = &v1pb.ApprovalNode_GroupValue_{- GroupValue: convertToApprovalNodeGroupValue(payload.GroupValue),- }+ v1node.Role = common.FormatRole(convertToRoleByGroupValue(payload.GroupValue).String())case *storepb.ApprovalNode_Role:- v1node.Payload = &v1pb.ApprovalNode_Role{- Role: payload.Role,- }+ v1node.Role = payload.Role}return v1node}-func convertToApprovalNodeGroupValue(v storepb.ApprovalNode_GroupValue) v1pb.ApprovalNode_GroupValue {+func convertToRoleByGroupValue(v storepb.ApprovalNode_GroupValue) base.Role {switch v {case storepb.ApprovalNode_GROUP_VALUE_UNSPECIFILED:- return v1pb.ApprovalNode_GROUP_VALUE_UNSPECIFILED+ return base.UnknownRolecase storepb.ApprovalNode_WORKSPACE_OWNER:- return v1pb.ApprovalNode_WORKSPACE_OWNER+ return base.WorkspaceAdmincase storepb.ApprovalNode_WORKSPACE_DBA:- return v1pb.ApprovalNode_WORKSPACE_DBA+ return base.WorkspaceDBAcase storepb.ApprovalNode_PROJECT_OWNER:- return v1pb.ApprovalNode_PROJECT_OWNER+ return base.ProjectOwnercase storepb.ApprovalNode_PROJECT_MEMBER:- return v1pb.ApprovalNode_PROJECT_MEMBER+ return base.ProjectDeveloperdefault:- return v1pb.ApprovalNode_GROUP_VALUE_UNSPECIFILED+ return base.UnknownRole}}diff --git a/backend/api/v1/issue_service_test.go b/backend/api/v1/issue_service_test.goindex 883c2b937d..38eaa61478 100644--- a/backend/api/v1/issue_service_test.go+++ b/backend/api/v1/issue_service_test.go@@ -5,6 +5,8 @@ import ("github.com/stretchr/testify/require"+ "github.com/bytebase/bytebase/backend/base"+ "github.com/bytebase/bytebase/backend/common"storepb "github.com/bytebase/bytebase/proto/generated-go/store"v1pb "github.com/bytebase/bytebase/proto/generated-go/v1")@@ -23,9 +25,7 @@ func TestConvertToApprovalNode(t *testing.T) {},want: &v1pb.ApprovalNode{Type: v1pb.ApprovalNode_ANY_IN_GROUP,- Payload: &v1pb.ApprovalNode_GroupValue_{- GroupValue: v1pb.ApprovalNode_WORKSPACE_DBA,- },+ Role: common.FormatRole(base.WorkspaceDBA.String()),},},}diff --git a/frontend/src/components/CustomApproval/Settings/components/CustomApproval/FlowsPanel/FlowTable.vue b/frontend/src/components/CustomApproval/Settings/components/CustomApproval/FlowsPanel/FlowTable.vueindex 43998ac535..bb5f0e5f47 100644--- a/frontend/src/components/CustomApproval/Settings/components/CustomApproval/FlowsPanel/FlowTable.vue+++ b/frontend/src/components/CustomApproval/Settings/components/CustomApproval/FlowsPanel/FlowTable.vue@@ -64,7 +64,7 @@ import { BBGrid, BBModal, type BBGridColumn } from "@/bbkit";import SystemLabel from "@/components/SystemLabel.vue";import { pushNotification, useWorkspaceApprovalSettingStore } from "@/store";import type { LocalApprovalRule } from "@/types";-import type { ApprovalFlow } from "@/types/proto/store/approval";+import type { ApprovalFlow } from "@/types/proto/v1/issue_service";import { isReadonlyApprovalRule } from "@/utils";import { SpinnerButton } from "../../common";import { StepsTable } from "../common";diff --git a/frontend/src/components/CustomApproval/Settings/components/CustomApproval/common/RoleSelect.vue b/frontend/src/components/CustomApproval/Settings/components/CustomApproval/common/RoleSelect.vuedeleted file mode 100644index 6a249f1bb8..0000000000--- a/frontend/src/components/CustomApproval/Settings/components/CustomApproval/common/RoleSelect.vue+++ /dev/null@@ -1,103 +0,0 @@-<template>- <NSelect- style="width: 12rem"- :options="options"- :value="value.groupValue ?? value.role"- :placeholder="$t('custom-approval.approval-flow.node.select-approver')"- :consistent-menu-width="false"- :disabled="!allowAdmin"- @update:value="handleUpdate"- />-</template>--<script lang="ts" setup>-import { type SelectOption, type SelectGroupOption, NSelect } from "naive-ui";-import { storeToRefs } from "pinia";-import { computed } from "vue";-import { useI18n } from "vue-i18n";-import { useRoleStore } from "@/store";-import type { ApprovalNode } from "@/types/proto/v1/issue_service";-import {- ApprovalNode_GroupValue,- ApprovalNode_Type,-} from "@/types/proto/v1/issue_service";-import { isCustomRole } from "@/utils";-import { approvalNodeGroupValueText, approvalNodeRoleText } from "@/utils";-import { useCustomApprovalContext } from "../context";--interface ApprovalNodeSelectOption extends SelectOption {- value: ApprovalNode_GroupValue | string | undefined;- node: ApprovalNode;-}--defineProps<{- value: ApprovalNode;-}>();--const emit = defineEmits<{- (event: "update:value", value: ApprovalNode): void;-}>();--const { t } = useI18n();-const context = useCustomApprovalContext();-const { allowAdmin } = context;-const { roleList } = storeToRefs(useRoleStore());--const options = computed(() => {- const presetGroupValueNodes = [- ApprovalNode_GroupValue.PROJECT_MEMBER,- ApprovalNode_GroupValue.PROJECT_OWNER,- ApprovalNode_GroupValue.WORKSPACE_DBA,- ApprovalNode_GroupValue.WORKSPACE_OWNER,- ].map<ApprovalNodeSelectOption>((role) => ({- node: {- type: ApprovalNode_Type.ANY_IN_GROUP,- groupValue: role,- },- label: approvalNodeGroupValueText(role),- value: role,- }));-- const customRoleNodes = roleList.value- .filter((role) => isCustomRole(role.name))- .map<ApprovalNodeSelectOption>((role) => ({- node: {- type: ApprovalNode_Type.ANY_IN_GROUP,- role: role.name,- },- label: approvalNodeRoleText(role.name),- value: role.name,- }));-- if (customRoleNodes.length === 0) {- return presetGroupValueNodes;- }-- const system: SelectGroupOption = {- type: "group",- label: t("custom-approval.approval-flow.node.roles.system"),- key: "system",- children: presetGroupValueNodes,- };- const groups = [system];- if (customRoleNodes.length > 0) {- const custom: SelectGroupOption = {- type: "group",- label: t("custom-approval.approval-flow.node.roles.custom"),- key: "custom",- children: customRoleNodes,- };- groups.push(custom);- }-- return groups;-});--const handleUpdate = (- value: ApprovalNodeSelectOption["value"],- option: SelectOption-) => {- const { node } = option as ApprovalNodeSelectOption;- emit("update:value", node);-};-</script>diff --git a/frontend/src/components/CustomApproval/Settings/components/CustomApproval/common/StepsTable.vue b/frontend/src/components/CustomApproval/Settings/components/CustomApproval/common/StepsTable.vueindex e077c48474..57445bde61 100644--- a/frontend/src/components/CustomApproval/Settings/components/CustomApproval/common/StepsTable.vue+++ b/frontend/src/components/CustomApproval/Settings/components/CustomApproval/common/StepsTable.vue@@ -12,11 +12,15 @@<div class="bb-grid-cell"><RoleSelectv-if="editable"- v-model:value="step.nodes[0]"+ :suffix="''"+ :value="step.nodes[0]?.role"style="width: 80%"@update:value="- (node) => {- step.nodes[0] = node;+ (role) => {+ step.nodes[0] = {+ type: ApprovalNode_Type.ANY_IN_GROUP,+ role: role as string,+ };$emit('update');}"@@ -66,9 +70,10 @@ import { NButton } from "naive-ui";import { computed } from "vue";import { useI18n } from "vue-i18n";import { BBGrid, type BBGridColumn } from "@/bbkit";+import { RoleSelect } from "@/components/v2";+import { PresetRoleType } from "@/types";import type { ApprovalFlow } from "@/types/proto/v1/issue_service";import {- ApprovalNode_GroupValue,ApprovalNode_Type,ApprovalStep,ApprovalStep_Type,@@ -76,7 +81,6 @@ import {import { approvalNodeText } from "@/utils";import { SpinnerButton } from "../../common";import { useCustomApprovalContext } from "../context";-import RoleSelect from "./RoleSelect.vue";const props = defineProps<{flow: ApprovalFlow;@@ -127,7 +131,7 @@ const addStep = () => {nodes: [{type: ApprovalNode_Type.ANY_IN_GROUP,- groupValue: ApprovalNode_GroupValue.WORKSPACE_OWNER,+ role: PresetRoleType.WORKSPACE_ADMIN,},],})diff --git a/frontend/src/components/CustomApproval/Settings/components/CustomApproval/logic/validate.ts b/frontend/src/components/CustomApproval/Settings/components/CustomApproval/logic/validate.tsindex c5cc2404be..df0dffdbaf 100644--- a/frontend/src/components/CustomApproval/Settings/components/CustomApproval/logic/validate.ts+++ b/frontend/src/components/CustomApproval/Settings/components/CustomApproval/logic/validate.ts@@ -3,7 +3,6 @@ import type {ApprovalTemplate,} from "@/types/proto/v1/issue_service";import {- ApprovalNode_GroupValue,ApprovalNode_Type,ApprovalStep_Type,} from "@/types/proto/v1/issue_service";@@ -13,12 +12,6 @@ const validateApprovalFlow = (flow: ApprovalFlow) => {ApprovalStep_Type.ALL,ApprovalStep_Type.ANY,]);- const SupportedGroupValues = new Set([- ApprovalNode_GroupValue.PROJECT_MEMBER,- ApprovalNode_GroupValue.PROJECT_OWNER,- ApprovalNode_GroupValue.WORKSPACE_DBA,- ApprovalNode_GroupValue.WORKSPACE_OWNER,- ]);if (flow.steps.length === 0) {return false;@@ -30,20 +23,11 @@ const validateApprovalFlow = (flow: ApprovalFlow) => {return false;}return nodes.every((node) => {- const { type, groupValue, role } = node;+ const { type, role } = node;if (type !== ApprovalNode_Type.ANY_IN_GROUP) {return false;}- if (!groupValue) {- if (!role) {- return false;- }- } else {- if (!SupportedGroupValues.has(groupValue)) {- return false;- }- }- return true;+ return !!role;});});};diff --git a/frontend/src/components/IssueV1/logic/review.ts b/frontend/src/components/IssueV1/logic/review.tsindex 1ba0a16d68..9e2943ec08 100644--- a/frontend/src/components/IssueV1/logic/review.ts+++ b/frontend/src/components/IssueV1/logic/review.ts@@ -11,10 +11,9 @@ import type {ComposedIssue,WrappedReviewStep,} from "@/types";-import { emptyFlow, PresetRoleType } from "@/types";+import { emptyFlow } from "@/types";import type { ApprovalNode, Issue } from "@/types/proto/v1/issue_service";import {- ApprovalNode_GroupValue,ApprovalNode_Type,Issue_Approver_Status,} from "@/types/proto/v1/issue_service";@@ -167,24 +166,12 @@ export const useWrappedReviewStepsV1 = (};export const displayReviewRoleTitle = (node: ApprovalNode) => {- const {- type,- groupValue = ApprovalNode_GroupValue.UNRECOGNIZED,- role,- } = node;+ const { type, role } = node;if (type !== ApprovalNode_Type.ANY_IN_GROUP) {return "";}- if (groupValue === ApprovalNode_GroupValue.WORKSPACE_OWNER) {- return displayRoleTitle(PresetRoleType.WORKSPACE_ADMIN);- } else if (groupValue === ApprovalNode_GroupValue.WORKSPACE_DBA) {- return displayRoleTitle(PresetRoleType.WORKSPACE_DBA);- } else if (groupValue === ApprovalNode_GroupValue.PROJECT_OWNER) {- return displayRoleTitle(PresetRoleType.PROJECT_OWNER);- } else if (groupValue === ApprovalNode_GroupValue.PROJECT_MEMBER) {- return displayRoleTitle(PresetRoleType.PROJECT_DEVELOPER);- } else if (role) {+ if (role) {return displayRoleTitle(role);}return "";diff --git a/frontend/src/components/v2/Select/RoleSelect.vue b/frontend/src/components/v2/Select/RoleSelect.vueindex b19628d513..74cd881c01 100644--- a/frontend/src/components/v2/Select/RoleSelect.vue+++ b/frontend/src/components/v2/Select/RoleSelect.vue@@ -14,7 +14,7 @@import type { SelectGroupOption, SelectOption } from "naive-ui";import { NSelect } from "naive-ui";import { computed } from "vue";-import { useI18n } from "vue-i18n";+import { t } from "@/plugins/i18n";import { useAppFeature, useRoleStore } from "@/store";import {PRESET_PROJECT_ROLES,@@ -24,18 +24,23 @@ import {} from "@/types";import { displayRoleTitle } from "@/utils";-withDefaults(+const props = withDefaults(defineProps<{value?: string[] | string | undefined;disabled?: boolean;clearable?: boolean;multiple?: boolean;+ suffix?: string;size?: "tiny" | "small" | "medium" | "large";}>(),{clearable: true,value: undefined,multiple: false,+ suffix: () =>+ ` (${t("common.optional")}, ${t(+ "role.project-roles.apply-to-all-projects"+ ).toLocaleLowerCase()})`,size: "medium",});@@ -44,7 +49,6 @@ defineEmits<{(event: "update:value", val: string | string[]): void;}>();-const { t } = useI18n();const roleStore = useRoleStore();const hideProjectRoles = useAppFeature("bb.feature.members.hide-project-roles");@@ -65,9 +69,7 @@ const availableRoleOptions = computed({type: "group",key: "project-roles",- label: `${t("role.project-roles.self")} (${t("common.optional")}, ${t(- "role.project-roles.apply-to-all-projects"- ).toLocaleLowerCase()})`,+ label: t("role.project-roles.self") + props.suffix,children: PRESET_PROJECT_ROLES.map((role) => ({label: displayRoleTitle(role),value: role,@@ -84,9 +86,7 @@ const availableRoleOptions = computed(roleGroups.push({type: "group",key: "custom-roles",- label: `${t("role.custom-roles.self")} (${t("common.optional")}, ${t(- "role.project-roles.apply-to-all-projects"- ).toLocaleLowerCase()})`,+ label: t("role.custom-roles.self") + props.suffix,children: customRoles.map((role) => ({label: displayRoleTitle(role),value: role,diff --git a/frontend/src/locales/en-US.json b/frontend/src/locales/en-US.jsonindex a38ada847d..b162863634 100644--- a/frontend/src/locales/en-US.json+++ b/frontend/src/locales/en-US.json@@ -964,7 +964,7 @@"waiting": "Ready to be executed","running": "Being executed"},- "retry-info":"Retrying (attempt {n}/{m}) due to lock timeout."+ "retry-info": "Retrying (attempt {n}/{m}) due to lock timeout."},"task-run-session": {"blocking-sessions": {@@ -2299,12 +2299,7 @@"order": "Order","approver": "Approver","add": "Add node",- "delete": "Delete approval node",- "select-approver": "Select approver",- "roles": {- "system": "System Roles",- "custom": "Custom Roles"- }+ "delete": "Delete approval node"},"view-approval-flow": "View approval flow","skip": "Skip manual approval",diff --git a/frontend/src/locales/es-ES.json b/frontend/src/locales/es-ES.jsonindex 306b0ac776..64528574f8 100644--- a/frontend/src/locales/es-ES.json+++ b/frontend/src/locales/es-ES.json@@ -2299,12 +2299,7 @@"order": "Orden","approver": "Aprobador","add": "Agregar nodo",- "delete": "Eliminar nodo de aprobación",- "select-approver": "Seleccionar aprobador",- "roles": {- "system": "Funciones del sistema",- "custom": "Funciones personalizadas"- }+ "delete": "Eliminar nodo de aprobación"},"view-approval-flow": "Ver flujo de aprobación","skip": "Omitir aprobación manual",@@ -2595,4 +2590,4 @@"last-visit": "Última visita","changelog-for-version": "Registro de cambios para {version}"}-}\ No newline at end of file+}diff --git a/frontend/src/locales/ja-JP.json b/frontend/src/locales/ja-JP.jsonindex f1c2c2cb2b..b06f3171da 100644--- a/frontend/src/locales/ja-JP.json+++ b/frontend/src/locales/ja-JP.json@@ -2299,12 +2299,7 @@"order": "注文","approver": "承認者","add": "ノードの追加",- "delete": "承認ノードの削除",- "select-approver": "承認者の選択",- "roles": {- "system": "システムの役割",- "custom": "カスタムロール"- }+ "delete": "承認ノードの削除"},"view-approval-flow": "承認フローを見る","skip": "手動承認をスキップする",@@ -2595,4 +2590,4 @@"last-visit": "最終訪問","changelog-for-version": "{version} の変更履歴"}-}\ No newline at end of file+}diff --git a/frontend/src/locales/vi-VN.json b/frontend/src/locales/vi-VN.jsonindex ced7e072f1..af6dcdd570 100644--- a/frontend/src/locales/vi-VN.json+++ b/frontend/src/locales/vi-VN.json@@ -2299,12 +2299,7 @@"order": "Thứ tự","approver": "Người phê duyệt","add": "Thêm nút",- "delete": "Xóa nút phê duyệt",- "select-approver": "Chọn người phê duyệt",- "roles": {- "system": "Vai trò hệ thống",- "custom": "Vai trò tùy chỉnh"- }+ "delete": "Xóa nút phê duyệt"},"view-approval-flow": "Xem quy trình phê duyệt","skip": "Bỏ qua phê duyệt thủ công",@@ -2595,4 +2590,4 @@"last-visit": "Lần truy cập cuối","changelog-for-version": "Nhật ký thay đổi cho phiên bản {version}"}-}\ No newline at end of file+}diff --git a/frontend/src/locales/zh-CN.json b/frontend/src/locales/zh-CN.jsonindex 3181087bf5..d28b19da84 100644--- a/frontend/src/locales/zh-CN.json+++ b/frontend/src/locales/zh-CN.json@@ -2299,12 +2299,7 @@"order": "顺序","approver": "审批人","add": "增加节点",- "delete": "删除审批节点",- "select-approver": "选择审批人",- "roles": {- "system": "系统角色",- "custom": "自定义角色"- }+ "delete": "删除审批节点"},"view-approval-flow": "查看审批流","skip": "跳过人工审批",diff --git a/frontend/src/store/modules/v1/issue.ts b/frontend/src/store/modules/v1/issue.tsindex ea8fec8808..e8c70522a4 100644--- a/frontend/src/store/modules/v1/issue.ts+++ b/frontend/src/store/modules/v1/issue.ts@@ -5,19 +5,16 @@ import type { WatchCallback } from "vue";import { ref, watch } from "vue";import { issueServiceClient } from "@/grpcweb";import type { ComposedIssue, IssueFilter } from "@/types";-import { PresetRoleType } from "@/types";import type { ApprovalStep } from "@/types/proto/v1/issue_service";import {issueStatusToJSON,ApprovalNode_Type,- ApprovalNode_GroupValue,} from "@/types/proto/v1/issue_service";import { memberMapToRolesInProjectIAM } from "@/utils";import {shallowComposeIssue,type ComposeIssueConfig,} from "./experimental-issue";-import { useWorkspaceV1Store } from "./workspace";export type ListIssueParams = {find: IssueFilter;@@ -120,74 +117,24 @@ export const useIssueV1Store = defineStore("issue_v1", () => {};});-const convertApprovalNodeGroupToRole = (- group: ApprovalNode_GroupValue-): string => {- switch (group) {- case ApprovalNode_GroupValue.PROJECT_MEMBER:- return PresetRoleType.PROJECT_DEVELOPER;- case ApprovalNode_GroupValue.PROJECT_OWNER:- return PresetRoleType.PROJECT_OWNER;- case ApprovalNode_GroupValue.WORKSPACE_DBA:- return PresetRoleType.WORKSPACE_DBA;- case ApprovalNode_GroupValue.WORKSPACE_OWNER:- return PresetRoleType.WORKSPACE_ADMIN;- }- return "";-};-// candidatesOfApprovalStepV1 return user name list in users/{email} format.// The list could includs users/ALL_USERS_USER_EMAILexport const candidatesOfApprovalStepV1 = (issue: ComposedIssue,step: ApprovalStep) => {- const workspaceStore = useWorkspaceV1Store();const project = issue.projectEntity;const candidates = step.nodes.flatMap((node) => {- const {- type,- groupValue = ApprovalNode_GroupValue.UNRECOGNIZED,- role,- } = node;+ const { type, role } = node;if (type !== ApprovalNode_Type.ANY_IN_GROUP) return [];- const candidatesForSystemRoles = (groupValue: ApprovalNode_GroupValue) => {- if (- groupValue === ApprovalNode_GroupValue.PROJECT_MEMBER ||- groupValue === ApprovalNode_GroupValue.PROJECT_OWNER- ) {- const targetRole = convertApprovalNodeGroupToRole(groupValue);- const projectMembersMap = memberMapToRolesInProjectIAM(- project.iamPolicy,- targetRole- );- return [...projectMembersMap.keys()];- }- if (- groupValue === ApprovalNode_GroupValue.WORKSPACE_DBA ||- groupValue === ApprovalNode_GroupValue.WORKSPACE_OWNER- ) {- return [- ...(workspaceStore.roleMapToUsers.get(- convertApprovalNodeGroupToRole(groupValue)- ) ?? new Set()),- ];- }- return [];- };-- const candidatesForCustomRoles = (role: string) => {+ const candidatesForRoles = (role: string) => {const memberMap = memberMapToRolesInProjectIAM(project.iamPolicy, role);return [...memberMap.keys()];};-- if (groupValue !== ApprovalNode_GroupValue.UNRECOGNIZED) {- return candidatesForSystemRoles(groupValue);- }if (role) {- return candidatesForCustomRoles(role);+ return candidatesForRoles(role);}return [];});diff --git a/frontend/src/types/proto/v1/issue_service.ts b/frontend/src/types/proto/v1/issue_service.tsindex bbb06d032e..1e61cd7e54 100644--- a/frontend/src/types/proto/v1/issue_service.ts+++ b/frontend/src/types/proto/v1/issue_service.ts@@ -593,11 +593,7 @@ export function approvalStep_TypeToNumber(object: ApprovalStep_Type): number {export interface ApprovalNode {type: ApprovalNode_Type;- groupValue?:- | ApprovalNode_GroupValue- | undefined;- /** Format: roles/{role} */- role?: string | undefined;+ role: string;}/**@@ -651,82 +647,6 @@ export function approvalNode_TypeToNumber(object: ApprovalNode_Type): number {}}-/**- * The predefined user groups are:- * - WORKSPACE_OWNER- * - WORKSPACE_DBA- * - PROJECT_OWNER- * - PROJECT_MEMBER- */-export enum ApprovalNode_GroupValue {- GROUP_VALUE_UNSPECIFILED = "GROUP_VALUE_UNSPECIFILED",- WORKSPACE_OWNER = "WORKSPACE_OWNER",- WORKSPACE_DBA = "WORKSPACE_DBA",- PROJECT_OWNER = "PROJECT_OWNER",- PROJECT_MEMBER = "PROJECT_MEMBER",- UNRECOGNIZED = "UNRECOGNIZED",-}--export function approvalNode_GroupValueFromJSON(object: any): ApprovalNode_GroupValue {- switch (object) {- case 0:- case "GROUP_VALUE_UNSPECIFILED":- return ApprovalNode_GroupValue.GROUP_VALUE_UNSPECIFILED;- case 1:- case "WORKSPACE_OWNER":- return ApprovalNode_GroupValue.WORKSPACE_OWNER;- case 2:- case "WORKSPACE_DBA":- return ApprovalNode_GroupValue.WORKSPACE_DBA;- case 3:- case "PROJECT_OWNER":- return ApprovalNode_GroupValue.PROJECT_OWNER;- case 4:- case "PROJECT_MEMBER":- return ApprovalNode_GroupValue.PROJECT_MEMBER;- case -1:- case "UNRECOGNIZED":- default:- return ApprovalNode_GroupValue.UNRECOGNIZED;- }-}--export function approvalNode_GroupValueToJSON(object: ApprovalNode_GroupValue): string {- switch (object) {- case ApprovalNode_GroupValue.GROUP_VALUE_UNSPECIFILED:- return "GROUP_VALUE_UNSPECIFILED";- case ApprovalNode_GroupValue.WORKSPACE_OWNER:- return "WORKSPACE_OWNER";- case ApprovalNode_GroupValue.WORKSPACE_DBA:- return "WORKSPACE_DBA";- case ApprovalNode_GroupValue.PROJECT_OWNER:- return "PROJECT_OWNER";- case ApprovalNode_GroupValue.PROJECT_MEMBER:- return "PROJECT_MEMBER";- case ApprovalNode_GroupValue.UNRECOGNIZED:- default:- return "UNRECOGNIZED";- }-}--export function approvalNode_GroupValueToNumber(object: ApprovalNode_GroupValue): number {- switch (object) {- case ApprovalNode_GroupValue.GROUP_VALUE_UNSPECIFILED:- return 0;- case ApprovalNode_GroupValue.WORKSPACE_OWNER:- return 1;- case ApprovalNode_GroupValue.WORKSPACE_DBA:- return 2;- case ApprovalNode_GroupValue.PROJECT_OWNER:- return 3;- case ApprovalNode_GroupValue.PROJECT_MEMBER:- return 4;- case ApprovalNode_GroupValue.UNRECOGNIZED:- default:- return -1;- }-}-export interface ListIssueCommentsRequest {/** Format: projects/{projects}/issues/{issue} */parent: string;@@ -2933,7 +2853,7 @@ export const ApprovalStep: MessageFns<ApprovalStep> = {};function createBaseApprovalNode(): ApprovalNode {- return { type: ApprovalNode_Type.TYPE_UNSPECIFIED, groupValue: undefined, role: undefined };+ return { type: ApprovalNode_Type.TYPE_UNSPECIFIED, role: "" };}export const ApprovalNode: MessageFns<ApprovalNode> = {@@ -2941,11 +2861,8 @@ export const ApprovalNode: MessageFns<ApprovalNode> = {if (message.type !== ApprovalNode_Type.TYPE_UNSPECIFIED) {writer.uint32(8).int32(approvalNode_TypeToNumber(message.type));}- if (message.groupValue !== undefined) {- writer.uint32(16).int32(approvalNode_GroupValueToNumber(message.groupValue));- }- if (message.role !== undefined) {- writer.uint32(26).string(message.role);+ if (message.role !== "") {+ writer.uint32(18).string(message.role);}return writer;},@@ -2966,15 +2883,7 @@ export const ApprovalNode: MessageFns<ApprovalNode> = {continue;}case 2: {- if (tag !== 16) {- break;- }-- message.groupValue = approvalNode_GroupValueFromJSON(reader.int32());- continue;- }- case 3: {- if (tag !== 26) {+ if (tag !== 18) {break;}@@ -2993,8 +2902,7 @@ export const ApprovalNode: MessageFns<ApprovalNode> = {fromJSON(object: any): ApprovalNode {return {type: isSet(object.type) ? approvalNode_TypeFromJSON(object.type) : ApprovalNode_Type.TYPE_UNSPECIFIED,- groupValue: isSet(object.groupValue) ? approvalNode_GroupValueFromJSON(object.groupValue) : undefined,- role: isSet(object.role) ? globalThis.String(object.role) : undefined,+ role: isSet(object.role) ? globalThis.String(object.role) : "",};},@@ -3003,10 +2911,7 @@ export const ApprovalNode: MessageFns<ApprovalNode> = {if (message.type !== ApprovalNode_Type.TYPE_UNSPECIFIED) {obj.type = approvalNode_TypeToJSON(message.type);}- if (message.groupValue !== undefined) {- obj.groupValue = approvalNode_GroupValueToJSON(message.groupValue);- }- if (message.role !== undefined) {+ if (message.role !== "") {obj.role = message.role;}return obj;@@ -3018,8 +2923,7 @@ export const ApprovalNode: MessageFns<ApprovalNode> = {fromPartial(object: DeepPartial<ApprovalNode>): ApprovalNode {const message = createBaseApprovalNode();message.type = object.type ?? ApprovalNode_Type.TYPE_UNSPECIFIED;- message.groupValue = object.groupValue ?? undefined;- message.role = object.role ?? undefined;+ message.role = object.role ?? "";return message;},};diff --git a/frontend/src/utils/workspaceApprovalSetting.ts b/frontend/src/utils/workspaceApprovalSetting.tsindex da893cb113..9b5a156beb 100644--- a/frontend/src/utils/workspaceApprovalSetting.ts+++ b/frontend/src/utils/workspaceApprovalSetting.ts@@ -8,7 +8,7 @@ import {isConditionGroupExpr,resolveCELExpr,} from "@/plugins/cel";-import { t, te } from "@/plugins/i18n";+import { t } from "@/plugins/i18n";import { useUserStore } from "@/store";import { userNamePrefix } from "@/store/modules/v1/common";import { extractUserId } from "@/store/modules/v1/common";@@ -17,15 +17,17 @@ import {DEFAULT_RISK_LEVEL,UNKNOWN_USER_NAME,SYSTEM_BOT_EMAIL,+ PresetRoleType,} from "@/types";import type { LocalApprovalConfig, LocalApprovalRule } from "@/types";import { PresetRiskLevelList, useSupportedSourceList } from "@/types";import { Expr as CELExpr } from "@/types/proto/google/api/expr/v1alpha1/syntax";import { Expr } from "@/types/proto/google/type/expr";-import type { ApprovalNode } from "@/types/proto/v1/issue_service";+import type {+ ApprovalNode,+ ApprovalStep,+} from "@/types/proto/v1/issue_service";import {- ApprovalNode_GroupValue,- approvalNode_GroupValueToJSON,ApprovalNode_Type,ApprovalStep_Type,} from "@/types/proto/v1/issue_service";@@ -43,24 +45,12 @@ import {} from "@/utils";import { displayRoleTitle } from "./role";-export const approvalNodeGroupValueText = (group: ApprovalNode_GroupValue) => {- const name = approvalNode_GroupValueToJSON(group);- const keypath = `dynamic.custom-approval.approval-flow.node.group.${name}`;- if (te(keypath)) {- return t(keypath);- }- return name;-};-export const approvalNodeRoleText = (role: string) => {return displayRoleTitle(role);};export const approvalNodeText = (node: ApprovalNode): string => {- const { groupValue, role } = node;- if (groupValue && groupValue !== ApprovalNode_GroupValue.UNRECOGNIZED) {- return approvalNodeGroupValueText(groupValue);- }+ const { role } = node;if (role) {return approvalNodeRoleText(role);}@@ -310,23 +300,25 @@ export const seedWorkspaceApprovalSetting = () => {const generateRule = (title: string,description: string,- roles: ApprovalNode_GroupValue[]+ roles: string[]): ApprovalRule => {- return ApprovalRule.fromJSON({+ return ApprovalRule.fromPartial({template: {title,description,creator: `${userNamePrefix}${useUserStore().systemBotUser?.email ?? SYSTEM_BOT_EMAIL}`,flow: {- steps: roles.map((role) => ({- type: ApprovalStep_Type.ANY,- nodes: [- {- type: ApprovalNode_Type.ANY_IN_GROUP,- groupValue: role,- },- ],- })),+ steps: roles.map(+ (role): ApprovalStep => ({+ type: ApprovalStep_Type.ALL,+ nodes: [+ {+ type: ApprovalNode_Type.ANY_IN_GROUP,+ role,+ },+ ],+ })+ ),},},});@@ -334,41 +326,38 @@ export const seedWorkspaceApprovalSetting = () => {type Preset = {title?: string;description: string;- roles: ApprovalNode_GroupValue[];+ roles: string[];};const presets: Preset[] = [{description: "owner-dba",- roles: [- ApprovalNode_GroupValue.PROJECT_OWNER,- ApprovalNode_GroupValue.WORKSPACE_DBA,- ],+ roles: [PresetRoleType.PROJECT_OWNER, PresetRoleType.WORKSPACE_DBA],},{description: "owner",- roles: [ApprovalNode_GroupValue.PROJECT_OWNER],+ roles: [PresetRoleType.PROJECT_OWNER],},{description: "dba",- roles: [ApprovalNode_GroupValue.WORKSPACE_DBA],+ roles: [PresetRoleType.WORKSPACE_DBA],},{description: "admin",- roles: [ApprovalNode_GroupValue.WORKSPACE_OWNER],+ roles: [PresetRoleType.WORKSPACE_ADMIN],},{description: "owner-dba-admin",roles: [- ApprovalNode_GroupValue.PROJECT_OWNER,- ApprovalNode_GroupValue.WORKSPACE_DBA,- ApprovalNode_GroupValue.WORKSPACE_OWNER,+ PresetRoleType.PROJECT_OWNER,+ PresetRoleType.WORKSPACE_DBA,+ PresetRoleType.WORKSPACE_ADMIN,],},];return presets.map((preset) => {const title =preset.title ??- preset.roles.map((role) => approvalNodeGroupValueText(role)).join(" -> ");+ preset.roles.map((role) => approvalNodeRoleText(role)).join(" -> ");const keypath = `custom-approval.approval-flow.presets.${preset.description}`;const description = t(keypath);return generateRule(title, description, preset.roles);diff --git a/proto/gen/grpc-doc/openapi.yaml b/proto/gen/grpc-doc/openapi.yamlindex 5f31c31865..5a8defc8c9 100644--- a/proto/gen/grpc-doc/openapi.yaml+++ b/proto/gen/grpc-doc/openapi.yaml@@ -7946,18 +7946,8 @@ components:- ANY_IN_GROUPtype: stringformat: enum- groupValue:- enum:- - GROUP_VALUE_UNSPECIFILED- - WORKSPACE_OWNER- - WORKSPACE_DBA- - PROJECT_OWNER- - PROJECT_MEMBER- type: string- format: enumrole:type: string- description: 'Format: roles/{role}'ApprovalStep:type: objectproperties:diff --git a/proto/gen/grpc-doc/v1/README.md b/proto/gen/grpc-doc/v1/README.mdindex de8192d812..e64d664870 100644--- a/proto/gen/grpc-doc/v1/README.md+++ b/proto/gen/grpc-doc/v1/README.md@@ -196,7 +196,6 @@- [UpdateIssueCommentRequest](#bytebase-v1-UpdateIssueCommentRequest)- [UpdateIssueRequest](#bytebase-v1-UpdateIssueRequest)- - [ApprovalNode.GroupValue](#bytebase-v1-ApprovalNode-GroupValue)- [ApprovalNode.Type](#bytebase-v1-ApprovalNode-Type)- [ApprovalStep.Type](#bytebase-v1-ApprovalStep-Type)- [Issue.Approver.Status](#bytebase-v1-Issue-Approver-Status)@@ -3278,8 +3277,7 @@ LIST, HASH (https://www.postgresql.org/docs/current/ddl-partitioning.html)| Field | Type | Label | Description || ----- | ---- | ----- | ----------- || type | [ApprovalNode.Type](#bytebase-v1-ApprovalNode-Type) | | |-| group_value | [ApprovalNode.GroupValue](#bytebase-v1-ApprovalNode-GroupValue) | | |-| role | [string](#string) | | Format: roles/{role} |+| role | [string](#string) | | |@@ -3806,25 +3804,6 @@ The issue's `name` field is used to identify the issue to update. Format: pr-<a name="bytebase-v1-ApprovalNode-GroupValue"></a>--### ApprovalNode.GroupValue-The predefined user groups are:-- WORKSPACE_OWNER-- WORKSPACE_DBA-- PROJECT_OWNER-- PROJECT_MEMBER--| Name | Number | Description |-| ---- | ------ | ----------- |-| GROUP_VALUE_UNSPECIFILED | 0 | |-| WORKSPACE_OWNER | 1 | |-| WORKSPACE_DBA | 2 | |-| PROJECT_OWNER | 3 | |-| PROJECT_MEMBER | 4 | |---<a name="bytebase-v1-ApprovalNode-Type"></a>### ApprovalNode.Typediff --git a/proto/gen/grpc-doc/v1/index.html b/proto/gen/grpc-doc/v1/index.htmlindex 9a23f83635..5ad36720c0 100644--- a/proto/gen/grpc-doc/v1/index.html+++ b/proto/gen/grpc-doc/v1/index.html@@ -925,10 +925,6 @@</li>- <li>- <a href="#bytebase.v1.ApprovalNode.GroupValue"><span class="badge">E</span>ApprovalNode.GroupValue</a>- </li>-<li><a href="#bytebase.v1.ApprovalNode.Type"><span class="badge">E</span>ApprovalNode.Type</a></li>@@ -10118,18 +10114,11 @@ The API will default to the BASIC view.</p></td><td><p> </p></td></tr>- <tr>- <td>group_value</td>- <td><a href="#bytebase.v1.ApprovalNode.GroupValue">ApprovalNode.GroupValue</a></td>- <td></td>- <td><p> </p></td>- </tr>-<tr><td>role</td><td><a href="#string">string</a></td><td></td>- <td><p>Format: roles/{role} </p></td>+ <td><p> </p></td></tr></tbody>@@ -11446,47 +11435,6 @@ Format: projects/{project}/issues/{issue} </p></td>- <h3 id="bytebase.v1.ApprovalNode.GroupValue">ApprovalNode.GroupValue</h3>- <p>The predefined user groups are:</p><p>- WORKSPACE_OWNER</p><p>- WORKSPACE_DBA</p><p>- PROJECT_OWNER</p><p>- PROJECT_MEMBER</p>- <table class="enum-table">- <thead>- <tr><td>Name</td><td>Number</td><td>Description</td></tr>- </thead>- <tbody>-- <tr>- <td>GROUP_VALUE_UNSPECIFILED</td>- <td>0</td>- <td><p></p></td>- </tr>-- <tr>- <td>WORKSPACE_OWNER</td>- <td>1</td>- <td><p></p></td>- </tr>-- <tr>- <td>WORKSPACE_DBA</td>- <td>2</td>- <td><p></p></td>- </tr>-- <tr>- <td>PROJECT_OWNER</td>- <td>3</td>- <td><p></p></td>- </tr>-- <tr>- <td>PROJECT_MEMBER</td>- <td>4</td>- <td><p></p></td>- </tr>-- </tbody>- </table>-<h3 id="bytebase.v1.ApprovalNode.Type">ApprovalNode.Type</h3><p>Type of the ApprovalNode.</p><p>type determines who should approve this node.</p><p>ANY_IN_GROUP means the ApprovalNode can be approved by an user from our predefined user group.</p><p>See GroupValue below for the predefined user groups.</p><table class="enum-table">diff --git a/proto/generated-go/v1/issue_service.pb.go b/proto/generated-go/v1/issue_service.pb.goindex 3e296df394..d22d31ccc0 100644--- a/proto/generated-go/v1/issue_service.pb.go+++ b/proto/generated-go/v1/issue_service.pb.go@@ -336,66 +336,6 @@ func (ApprovalNode_Type) EnumDescriptor() ([]byte, []int) {return file_v1_issue_service_proto_rawDescGZIP(), []int{17, 0}}-// The predefined user groups are:-// - WORKSPACE_OWNER-// - WORKSPACE_DBA-// - PROJECT_OWNER-// - PROJECT_MEMBER-type ApprovalNode_GroupValue int32--const (- ApprovalNode_GROUP_VALUE_UNSPECIFILED ApprovalNode_GroupValue = 0- ApprovalNode_WORKSPACE_OWNER ApprovalNode_GroupValue = 1- ApprovalNode_WORKSPACE_DBA ApprovalNode_GroupValue = 2- ApprovalNode_PROJECT_OWNER ApprovalNode_GroupValue = 3- ApprovalNode_PROJECT_MEMBER ApprovalNode_GroupValue = 4-)--// Enum value maps for ApprovalNode_GroupValue.-var (- ApprovalNode_GroupValue_name = map[int32]string{- 0: "GROUP_VALUE_UNSPECIFILED",- 1: "WORKSPACE_OWNER",- 2: "WORKSPACE_DBA",- 3: "PROJECT_OWNER",- 4: "PROJECT_MEMBER",- }- ApprovalNode_GroupValue_value = map[string]int32{- "GROUP_VALUE_UNSPECIFILED": 0,- "WORKSPACE_OWNER": 1,- "WORKSPACE_DBA": 2,- "PROJECT_OWNER": 3,- "PROJECT_MEMBER": 4,- }-)--func (x ApprovalNode_GroupValue) Enum() *ApprovalNode_GroupValue {- p := new(ApprovalNode_GroupValue)- *p = x- return p-}--func (x ApprovalNode_GroupValue) String() string {- return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))-}--func (ApprovalNode_GroupValue) Descriptor() protoreflect.EnumDescriptor {- return file_v1_issue_service_proto_enumTypes[6].Descriptor()-}--func (ApprovalNode_GroupValue) Type() protoreflect.EnumType {- return &file_v1_issue_service_proto_enumTypes[6]-}--func (x ApprovalNode_GroupValue) Number() protoreflect.EnumNumber {- return protoreflect.EnumNumber(x)-}--// Deprecated: Use ApprovalNode_GroupValue.Descriptor instead.-func (ApprovalNode_GroupValue) EnumDescriptor() ([]byte, []int) {- return file_v1_issue_service_proto_rawDescGZIP(), []int{17, 1}-}-type IssueComment_Approval_Status int32const (@@ -432,11 +372,11 @@ func (x IssueComment_Approval_Status) String() string {}func (IssueComment_Approval_Status) Descriptor() protoreflect.EnumDescriptor {- return file_v1_issue_service_proto_enumTypes[7].Descriptor()+ return file_v1_issue_service_proto_enumTypes[6].Descriptor()}func (IssueComment_Approval_Status) Type() protoreflect.EnumType {- return &file_v1_issue_service_proto_enumTypes[7]+ return &file_v1_issue_service_proto_enumTypes[6]}func (x IssueComment_Approval_Status) Number() protoreflect.EnumNumber {@@ -493,11 +433,11 @@ func (x IssueComment_TaskUpdate_Status) String() string {}func (IssueComment_TaskUpdate_Status) Descriptor() protoreflect.EnumDescriptor {- return file_v1_issue_service_proto_enumTypes[8].Descriptor()+ return file_v1_issue_service_proto_enumTypes[7].Descriptor()}func (IssueComment_TaskUpdate_Status) Type() protoreflect.EnumType {- return &file_v1_issue_service_proto_enumTypes[8]+ return &file_v1_issue_service_proto_enumTypes[7]}func (x IssueComment_TaskUpdate_Status) Number() protoreflect.EnumNumber {@@ -1703,13 +1643,9 @@ func (x *ApprovalStep) GetNodes() []*ApprovalNode {}type ApprovalNode struct {- state protoimpl.MessageState `protogen:"open.v1"`- Type ApprovalNode_Type `protobuf:"varint,1,opt,name=type,proto3,enum=bytebase.v1.ApprovalNode_Type" json:"type,omitempty"`- // Types that are valid to be assigned to Payload:- //- // *ApprovalNode_GroupValue_- // *ApprovalNode_Role- Payload isApprovalNode_Payload `protobuf_oneof:"payload"`+ state protoimpl.MessageState `protogen:"open.v1"`+ Type ApprovalNode_Type `protobuf:"varint,1,opt,name=type,proto3,enum=bytebase.v1.ApprovalNode_Type" json:"type,omitempty"`+ Role string `protobuf:"bytes,2,opt,name=role,proto3" json:"role,omitempty"`unknownFields protoimpl.UnknownFieldssizeCache protoimpl.SizeCache}@@ -1751,48 +1687,13 @@ func (x *ApprovalNode) GetType() ApprovalNode_Type {return ApprovalNode_TYPE_UNSPECIFIED}-func (x *ApprovalNode) GetPayload() isApprovalNode_Payload {- if x != nil {- return x.Payload- }- return nil-}--func (x *ApprovalNode) GetGroupValue() ApprovalNode_GroupValue {- if x != nil {- if x, ok := x.Payload.(*ApprovalNode_GroupValue_); ok {- return x.GroupValue- }- }- return ApprovalNode_GROUP_VALUE_UNSPECIFILED-}-func (x *ApprovalNode) GetRole() string {if x != nil {- if x, ok := x.Payload.(*ApprovalNode_Role); ok {- return x.Role- }+ return x.Role}return ""}-type isApprovalNode_Payload interface {- isApprovalNode_Payload()-}--type ApprovalNode_GroupValue_ struct {- GroupValue ApprovalNode_GroupValue `protobuf:"varint,2,opt,name=group_value,json=groupValue,proto3,enum=bytebase.v1.ApprovalNode_GroupValue,oneof"`-}--type ApprovalNode_Role struct {- // Format: roles/{role}- Role string `protobuf:"bytes,3,opt,name=role,proto3,oneof"`-}--func (*ApprovalNode_GroupValue_) isApprovalNode_Payload() {}--func (*ApprovalNode_Role) isApprovalNode_Payload() {}-type ListIssueCommentsRequest struct {state protoimpl.MessageState `protogen:"open.v1"`// Format: projects/{projects}/issues/{issue}@@ -2796,23 +2697,13 @@ const file_v1_issue_service_proto_rawDesc = "" +"\x04Type\x12\x14\n" +"\x10TYPE_UNSPECIFIED\x10\x00\x12\a\n" +"\x03ALL\x10\x01\x12\a\n" +- "\x03ANY\x10\x02\"\xd7\x02\n" ++ "\x03ANY\x10\x02\"\x86\x01\n" +"\fApprovalNode\x122\n" +- "\x04type\x18\x01 \x01(\x0e2\x1e.bytebase.v1.ApprovalNode.TypeR\x04type\x12G\n" +- "\vgroup_value\x18\x02 \x01(\x0e2$.bytebase.v1.ApprovalNode.GroupValueH\x00R\n" +- "groupValue\x12\x14\n" +- "\x04role\x18\x03 \x01(\tH\x00R\x04role\".\n" ++ "\x04type\x18\x01 \x01(\x0e2\x1e.bytebase.v1.ApprovalNode.TypeR\x04type\x12\x12\n" ++ "\x04role\x18\x02 \x01(\tR\x04role\".\n" +"\x04Type\x12\x14\n" +"\x10TYPE_UNSPECIFIED\x10\x00\x12\x10\n" +- "\fANY_IN_GROUP\x10\x01\"y\n" +- "\n" +- "GroupValue\x12\x1c\n" +- "\x18GROUP_VALUE_UNSPECIFILED\x10\x00\x12\x13\n" +- "\x0fWORKSPACE_OWNER\x10\x01\x12\x11\n" +- "\rWORKSPACE_DBA\x10\x02\x12\x11\n" +- "\rPROJECT_OWNER\x10\x03\x12\x12\n" +- "\x0ePROJECT_MEMBER\x10\x04B\t\n" +- "\apayload\"\x8b\x01\n" ++ "\fANY_IN_GROUP\x10\x01\"\x8b\x01\n" +"\x18ListIssueCommentsRequest\x123\n" +"\x06parent\x18\x01 \x01(\tB\x1b\xe2A\x01\x02\xfaA\x14\n" +"\x12bytebase.com/IssueR\x06parent\x12\x1b\n" +@@ -2944,7 +2835,7 @@ func file_v1_issue_service_proto_rawDescGZIP() []byte {return file_v1_issue_service_proto_rawDescData}-var file_v1_issue_service_proto_enumTypes = make([]protoimpl.EnumInfo, 9)+var file_v1_issue_service_proto_enumTypes = make([]protoimpl.EnumInfo, 8)var file_v1_issue_service_proto_msgTypes = make([]protoimpl.MessageInfo, 31)var file_v1_issue_service_proto_goTypes = []any{(IssueStatus)(0), // 0: bytebase.v1.IssueStatus@@ -2953,117 +2844,115 @@ var file_v1_issue_service_proto_goTypes = []any{(Issue_Approver_Status)(0), // 3: bytebase.v1.Issue.Approver.Status(ApprovalStep_Type)(0), // 4: bytebase.v1.ApprovalStep.Type(ApprovalNode_Type)(0), // 5: bytebase.v1.ApprovalNode.Type- (ApprovalNode_GroupValue)(0), // 6: bytebase.v1.ApprovalNode.GroupValue- (IssueComment_Approval_Status)(0), // 7: bytebase.v1.IssueComment.Approval.Status- (IssueComment_TaskUpdate_Status)(0), // 8: bytebase.v1.IssueComment.TaskUpdate.Status- (*GetIssueRequest)(nil), // 9: bytebase.v1.GetIssueRequest- (*CreateIssueRequest)(nil), // 10: bytebase.v1.CreateIssueRequest- (*ListIssuesRequest)(nil), // 11: bytebase.v1.ListIssuesRequest- (*ListIssuesResponse)(nil), // 12: bytebase.v1.ListIssuesResponse- (*SearchIssuesRequest)(nil), // 13: bytebase.v1.SearchIssuesRequest- (*SearchIssuesResponse)(nil), // 14: bytebase.v1.SearchIssuesResponse- (*UpdateIssueRequest)(nil), // 15: bytebase.v1.UpdateIssueRequest- (*BatchUpdateIssuesStatusRequest)(nil), // 16: bytebase.v1.BatchUpdateIssuesStatusRequest- (*BatchUpdateIssuesStatusResponse)(nil), // 17: bytebase.v1.BatchUpdateIssuesStatusResponse- (*ApproveIssueRequest)(nil), // 18: bytebase.v1.ApproveIssueRequest- (*RejectIssueRequest)(nil), // 19: bytebase.v1.RejectIssueRequest- (*RequestIssueRequest)(nil), // 20: bytebase.v1.RequestIssueRequest- (*Issue)(nil), // 21: bytebase.v1.Issue- (*GrantRequest)(nil), // 22: bytebase.v1.GrantRequest- (*ApprovalTemplate)(nil), // 23: bytebase.v1.ApprovalTemplate- (*ApprovalFlow)(nil), // 24: bytebase.v1.ApprovalFlow- (*ApprovalStep)(nil), // 25: bytebase.v1.ApprovalStep- (*ApprovalNode)(nil), // 26: bytebase.v1.ApprovalNode- (*ListIssueCommentsRequest)(nil), // 27: bytebase.v1.ListIssueCommentsRequest- (*ListIssueCommentsResponse)(nil), // 28: bytebase.v1.ListIssueCommentsResponse- (*CreateIssueCommentRequest)(nil), // 29: bytebase.v1.CreateIssueCommentRequest- (*UpdateIssueCommentRequest)(nil), // 30: bytebase.v1.UpdateIssueCommentRequest- (*IssueComment)(nil), // 31: bytebase.v1.IssueComment- (*Issue_Approver)(nil), // 32: bytebase.v1.Issue.Approver- nil, // 33: bytebase.v1.Issue.TaskStatusCountEntry- (*IssueComment_Approval)(nil), // 34: bytebase.v1.IssueComment.Approval- (*IssueComment_IssueUpdate)(nil), // 35: bytebase.v1.IssueComment.IssueUpdate- (*IssueComment_StageEnd)(nil), // 36: bytebase.v1.IssueComment.StageEnd- (*IssueComment_TaskUpdate)(nil), // 37: bytebase.v1.IssueComment.TaskUpdate- (*IssueComment_TaskPriorBackup)(nil), // 38: bytebase.v1.IssueComment.TaskPriorBackup- (*IssueComment_TaskPriorBackup_Table)(nil), // 39: bytebase.v1.IssueComment.TaskPriorBackup.Table- (*fieldmaskpb.FieldMask)(nil), // 40: google.protobuf.FieldMask- (*timestamppb.Timestamp)(nil), // 41: google.protobuf.Timestamp- (*expr.Expr)(nil), // 42: google.type.Expr- (*durationpb.Duration)(nil), // 43: google.protobuf.Duration+ (IssueComment_Approval_Status)(0), // 6: bytebase.v1.IssueComment.Approval.Status+ (IssueComment_TaskUpdate_Status)(0), // 7: bytebase.v1.IssueComment.TaskUpdate.Status+ (*GetIssueRequest)(nil), // 8: bytebase.v1.GetIssueRequest+ (*CreateIssueRequest)(nil), // 9: bytebase.v1.CreateIssueRequest+ (*ListIssuesRequest)(nil), // 10: bytebase.v1.ListIssuesRequest+ (*ListIssuesResponse)(nil), // 11: bytebase.v1.ListIssuesResponse+ (*SearchIssuesRequest)(nil), // 12: bytebase.v1.SearchIssuesRequest+ (*SearchIssuesResponse)(nil), // 13: bytebase.v1.SearchIssuesResponse+ (*UpdateIssueRequest)(nil), // 14: bytebase.v1.UpdateIssueRequest+ (*BatchUpdateIssuesStatusRequest)(nil), // 15: bytebase.v1.BatchUpdateIssuesStatusRequest+ (*BatchUpdateIssuesStatusResponse)(nil), // 16: bytebase.v1.BatchUpdateIssuesStatusResponse+ (*ApproveIssueRequest)(nil), // 17: bytebase.v1.ApproveIssueRequest+ (*RejectIssueRequest)(nil), // 18: bytebase.v1.RejectIssueRequest+ (*RequestIssueRequest)(nil), // 19: bytebase.v1.RequestIssueRequest+ (*Issue)(nil), // 20: bytebase.v1.Issue+ (*GrantRequest)(nil), // 21: bytebase.v1.GrantRequest+ (*ApprovalTemplate)(nil), // 22: bytebase.v1.ApprovalTemplate+ (*ApprovalFlow)(nil), // 23: bytebase.v1.ApprovalFlow+ (*ApprovalStep)(nil), // 24: bytebase.v1.ApprovalStep+ (*ApprovalNode)(nil), // 25: bytebase.v1.ApprovalNode+ (*ListIssueCommentsRequest)(nil), // 26: bytebase.v1.ListIssueCommentsRequest+ (*ListIssueCommentsResponse)(nil), // 27: bytebase.v1.ListIssueCommentsResponse+ (*CreateIssueCommentRequest)(nil), // 28: bytebase.v1.CreateIssueCommentRequest+ (*UpdateIssueCommentRequest)(nil), // 29: bytebase.v1.UpdateIssueCommentRequest+ (*IssueComment)(nil), // 30: bytebase.v1.IssueComment+ (*Issue_Approver)(nil), // 31: bytebase.v1.Issue.Approver+ nil, // 32: bytebase.v1.Issue.TaskStatusCountEntry+ (*IssueComment_Approval)(nil), // 33: bytebase.v1.IssueComment.Approval+ (*IssueComment_IssueUpdate)(nil), // 34: bytebase.v1.IssueComment.IssueUpdate+ (*IssueComment_StageEnd)(nil), // 35: bytebase.v1.IssueComment.StageEnd+ (*IssueComment_TaskUpdate)(nil), // 36: bytebase.v1.IssueComment.TaskUpdate+ (*IssueComment_TaskPriorBackup)(nil), // 37: bytebase.v1.IssueComment.TaskPriorBackup+ (*IssueComment_TaskPriorBackup_Table)(nil), // 38: bytebase.v1.IssueComment.TaskPriorBackup.Table+ (*fieldmaskpb.FieldMask)(nil), // 39: google.protobuf.FieldMask+ (*timestamppb.Timestamp)(nil), // 40: google.protobuf.Timestamp+ (*expr.Expr)(nil), // 41: google.type.Expr+ (*durationpb.Duration)(nil), // 42: google.protobuf.Duration}var file_v1_issue_service_proto_depIdxs = []int32{- 21, // 0: bytebase.v1.CreateIssueRequest.issue:type_name -> bytebase.v1.Issue- 21, // 1: bytebase.v1.ListIssuesResponse.issues:type_name -> bytebase.v1.Issue- 21, // 2: bytebase.v1.SearchIssuesResponse.issues:type_name -> bytebase.v1.Issue- 21, // 3: bytebase.v1.UpdateIssueRequest.issue:type_name -> bytebase.v1.Issue- 40, // 4: bytebase.v1.UpdateIssueRequest.update_mask:type_name -> google.protobuf.FieldMask+ 20, // 0: bytebase.v1.CreateIssueRequest.issue:type_name -> bytebase.v1.Issue+ 20, // 1: bytebase.v1.ListIssuesResponse.issues:type_name -> bytebase.v1.Issue+ 20, // 2: bytebase.v1.SearchIssuesResponse.issues:type_name -> bytebase.v1.Issue+ 20, // 3: bytebase.v1.UpdateIssueRequest.issue:type_name -> bytebase.v1.Issue+ 39, // 4: bytebase.v1.UpdateIssueRequest.update_mask:type_name -> google.protobuf.FieldMask0, // 5: bytebase.v1.BatchUpdateIssuesStatusRequest.status:type_name -> bytebase.v1.IssueStatus1, // 6: bytebase.v1.Issue.type:type_name -> bytebase.v1.Issue.Type0, // 7: bytebase.v1.Issue.status:type_name -> bytebase.v1.IssueStatus- 32, // 8: bytebase.v1.Issue.approvers:type_name -> bytebase.v1.Issue.Approver- 23, // 9: bytebase.v1.Issue.approval_templates:type_name -> bytebase.v1.ApprovalTemplate- 41, // 10: bytebase.v1.Issue.create_time:type_name -> google.protobuf.Timestamp- 41, // 11: bytebase.v1.Issue.update_time:type_name -> google.protobuf.Timestamp- 22, // 12: bytebase.v1.Issue.grant_request:type_name -> bytebase.v1.GrantRequest+ 31, // 8: bytebase.v1.Issue.approvers:type_name -> bytebase.v1.Issue.Approver+ 22, // 9: bytebase.v1.Issue.approval_templates:type_name -> bytebase.v1.ApprovalTemplate+ 40, // 10: bytebase.v1.Issue.create_time:type_name -> google.protobuf.Timestamp+ 40, // 11: bytebase.v1.Issue.update_time:type_name -> google.protobuf.Timestamp+ 21, // 12: bytebase.v1.Issue.grant_request:type_name -> bytebase.v1.GrantRequest2, // 13: bytebase.v1.Issue.risk_level:type_name -> bytebase.v1.Issue.RiskLevel- 33, // 14: bytebase.v1.Issue.task_status_count:type_name -> bytebase.v1.Issue.TaskStatusCountEntry- 42, // 15: bytebase.v1.GrantRequest.condition:type_name -> google.type.Expr- 43, // 16: bytebase.v1.GrantRequest.expiration:type_name -> google.protobuf.Duration- 24, // 17: bytebase.v1.ApprovalTemplate.flow:type_name -> bytebase.v1.ApprovalFlow- 25, // 18: bytebase.v1.ApprovalFlow.steps:type_name -> bytebase.v1.ApprovalStep+ 32, // 14: bytebase.v1.Issue.task_status_count:type_name -> bytebase.v1.Issue.TaskStatusCountEntry+ 41, // 15: bytebase.v1.GrantRequest.condition:type_name -> google.type.Expr+ 42, // 16: bytebase.v1.GrantRequest.expiration:type_name -> google.protobuf.Duration+ 23, // 17: bytebase.v1.ApprovalTemplate.flow:type_name -> bytebase.v1.ApprovalFlow+ 24, // 18: bytebase.v1.ApprovalFlow.steps:type_name -> bytebase.v1.ApprovalStep4, // 19: bytebase.v1.ApprovalStep.type:type_name -> bytebase.v1.ApprovalStep.Type- 26, // 20: bytebase.v1.ApprovalStep.nodes:type_name -> bytebase.v1.ApprovalNode+ 25, // 20: bytebase.v1.ApprovalStep.nodes:type_name -> bytebase.v1.ApprovalNode5, // 21: bytebase.v1.ApprovalNode.type:type_name -> bytebase.v1.ApprovalNode.Type- 6, // 22: bytebase.v1.ApprovalNode.group_value:type_name -> bytebase.v1.ApprovalNode.GroupValue- 31, // 23: bytebase.v1.ListIssueCommentsResponse.issue_comments:type_name -> bytebase.v1.IssueComment- 31, // 24: bytebase.v1.CreateIssueCommentRequest.issue_comment:type_name -> bytebase.v1.IssueComment- 31, // 25: bytebase.v1.UpdateIssueCommentRequest.issue_comment:type_name -> bytebase.v1.IssueComment- 40, // 26: bytebase.v1.UpdateIssueCommentRequest.update_mask:type_name -> google.protobuf.FieldMask- 41, // 27: bytebase.v1.IssueComment.create_time:type_name -> google.protobuf.Timestamp- 41, // 28: bytebase.v1.IssueComment.update_time:type_name -> google.protobuf.Timestamp- 34, // 29: bytebase.v1.IssueComment.approval:type_name -> bytebase.v1.IssueComment.Approval- 35, // 30: bytebase.v1.IssueComment.issue_update:type_name -> bytebase.v1.IssueComment.IssueUpdate- 36, // 31: bytebase.v1.IssueComment.stage_end:type_name -> bytebase.v1.IssueComment.StageEnd- 37, // 32: bytebase.v1.IssueComment.task_update:type_name -> bytebase.v1.IssueComment.TaskUpdate- 38, // 33: bytebase.v1.IssueComment.task_prior_backup:type_name -> bytebase.v1.IssueComment.TaskPriorBackup- 3, // 34: bytebase.v1.Issue.Approver.status:type_name -> bytebase.v1.Issue.Approver.Status- 7, // 35: bytebase.v1.IssueComment.Approval.status:type_name -> bytebase.v1.IssueComment.Approval.Status- 0, // 36: bytebase.v1.IssueComment.IssueUpdate.from_status:type_name -> bytebase.v1.IssueStatus- 0, // 37: bytebase.v1.IssueComment.IssueUpdate.to_status:type_name -> bytebase.v1.IssueStatus- 41, // 38: bytebase.v1.IssueComment.TaskUpdate.from_earliest_allowed_time:type_name -> google.protobuf.Timestamp- 41, // 39: bytebase.v1.IssueComment.TaskUpdate.to_earliest_allowed_time:type_name -> google.protobuf.Timestamp- 8, // 40: bytebase.v1.IssueComment.TaskUpdate.to_status:type_name -> bytebase.v1.IssueComment.TaskUpdate.Status- 39, // 41: bytebase.v1.IssueComment.TaskPriorBackup.tables:type_name -> bytebase.v1.IssueComment.TaskPriorBackup.Table- 9, // 42: bytebase.v1.IssueService.GetIssue:input_type -> bytebase.v1.GetIssueRequest- 10, // 43: bytebase.v1.IssueService.CreateIssue:input_type -> bytebase.v1.CreateIssueRequest- 11, // 44: bytebase.v1.IssueService.ListIssues:input_type -> bytebase.v1.ListIssuesRequest- 13, // 45: bytebase.v1.IssueService.SearchIssues:input_type -> bytebase.v1.SearchIssuesRequest- 15, // 46: bytebase.v1.IssueService.UpdateIssue:input_type -> bytebase.v1.UpdateIssueRequest- 27, // 47: bytebase.v1.IssueService.ListIssueComments:input_type -> bytebase.v1.ListIssueCommentsRequest- 29, // 48: bytebase.v1.IssueService.CreateIssueComment:input_type -> bytebase.v1.CreateIssueCommentRequest- 30, // 49: bytebase.v1.IssueService.UpdateIssueComment:input_type -> bytebase.v1.UpdateIssueCommentRequest- 16, // 50: bytebase.v1.IssueService.BatchUpdateIssuesStatus:input_type -> bytebase.v1.BatchUpdateIssuesStatusRequest- 18, // 51: bytebase.v1.IssueService.ApproveIssue:input_type -> bytebase.v1.ApproveIssueRequest- 19, // 52: bytebase.v1.IssueService.RejectIssue:input_type -> bytebase.v1.RejectIssueRequest- 20, // 53: bytebase.v1.IssueService.RequestIssue:input_type -> bytebase.v1.RequestIssueRequest- 21, // 54: bytebase.v1.IssueService.GetIssue:output_type -> bytebase.v1.Issue- 21, // 55: bytebase.v1.IssueService.CreateIssue:output_type -> bytebase.v1.Issue- 12, // 56: bytebase.v1.IssueService.ListIssues:output_type -> bytebase.v1.ListIssuesResponse- 14, // 57: bytebase.v1.IssueService.SearchIssues:output_type -> bytebase.v1.SearchIssuesResponse- 21, // 58: bytebase.v1.IssueService.UpdateIssue:output_type -> bytebase.v1.Issue- 28, // 59: bytebase.v1.IssueService.ListIssueComments:output_type -> bytebase.v1.ListIssueCommentsResponse- 31, // 60: bytebase.v1.IssueService.CreateIssueComment:output_type -> bytebase.v1.IssueComment- 31, // 61: bytebase.v1.IssueService.UpdateIssueComment:output_type -> bytebase.v1.IssueComment- 17, // 62: bytebase.v1.IssueService.BatchUpdateIssuesStatus:output_type -> bytebase.v1.BatchUpdateIssuesStatusResponse- 21, // 63: bytebase.v1.IssueService.ApproveIssue:output_type -> bytebase.v1.Issue- 21, // 64: bytebase.v1.IssueService.RejectIssue:output_type -> bytebase.v1.Issue- 21, // 65: bytebase.v1.IssueService.RequestIssue:output_type -> bytebase.v1.Issue- 54, // [54:66] is the sub-list for method output_type- 42, // [42:54] is the sub-list for method input_type- 42, // [42:42] is the sub-list for extension type_name- 42, // [42:42] is the sub-list for extension extendee- 0, // [0:42] is the sub-list for field type_name+ 30, // 22: bytebase.v1.ListIssueCommentsResponse.issue_comments:type_name -> bytebase.v1.IssueComment+ 30, // 23: bytebase.v1.CreateIssueCommentRequest.issue_comment:type_name -> bytebase.v1.IssueComment+ 30, // 24: bytebase.v1.UpdateIssueCommentRequest.issue_comment:type_name -> bytebase.v1.IssueComment+ 39, // 25: bytebase.v1.UpdateIssueCommentRequest.update_mask:type_name -> google.protobuf.FieldMask+ 40, // 26: bytebase.v1.IssueComment.create_time:type_name -> google.protobuf.Timestamp+ 40, // 27: bytebase.v1.IssueComment.update_time:type_name -> google.protobuf.Timestamp+ 33, // 28: bytebase.v1.IssueComment.approval:type_name -> bytebase.v1.IssueComment.Approval+ 34, // 29: bytebase.v1.IssueComment.issue_update:type_name -> bytebase.v1.IssueComment.IssueUpdate+ 35, // 30: bytebase.v1.IssueComment.stage_end:type_name -> bytebase.v1.IssueComment.StageEnd+ 36, // 31: bytebase.v1.IssueComment.task_update:type_name -> bytebase.v1.IssueComment.TaskUpdate+ 37, // 32: bytebase.v1.IssueComment.task_prior_backup:type_name -> bytebase.v1.IssueComment.TaskPriorBackup+ 3, // 33: bytebase.v1.Issue.Approver.status:type_name -> bytebase.v1.Issue.Approver.Status+ 6, // 34: bytebase.v1.IssueComment.Approval.status:type_name -> bytebase.v1.IssueComment.Approval.Status+ 0, // 35: bytebase.v1.IssueComment.IssueUpdate.from_status:type_name -> bytebase.v1.IssueStatus+ 0, // 36: bytebase.v1.IssueComment.IssueUpdate.to_status:type_name -> bytebase.v1.IssueStatus+ 40, // 37: bytebase.v1.IssueComment.TaskUpdate.from_earliest_allowed_time:type_name -> google.protobuf.Timestamp+ 40, // 38: bytebase.v1.IssueComment.TaskUpdate.to_earliest_allowed_time:type_name -> google.protobuf.Timestamp+ 7, // 39: bytebase.v1.IssueComment.TaskUpdate.to_status:type_name -> bytebase.v1.IssueComment.TaskUpdate.Status+ 38, // 40: bytebase.v1.IssueComment.TaskPriorBackup.tables:type_name -> bytebase.v1.IssueComment.TaskPriorBackup.Table+ 8, // 41: bytebase.v1.IssueService.GetIssue:input_type -> bytebase.v1.GetIssueRequest+ 9, // 42: bytebase.v1.IssueService.CreateIssue:input_type -> bytebase.v1.CreateIssueRequest+ 10, // 43: bytebase.v1.IssueService.ListIssues:input_type -> bytebase.v1.ListIssuesRequest+ 12, // 44: bytebase.v1.IssueService.SearchIssues:input_type -> bytebase.v1.SearchIssuesRequest+ 14, // 45: bytebase.v1.IssueService.UpdateIssue:input_type -> bytebase.v1.UpdateIssueRequest+ 26, // 46: bytebase.v1.IssueService.ListIssueComments:input_type -> bytebase.v1.ListIssueCommentsRequest+ 28, // 47: bytebase.v1.IssueService.CreateIssueComment:input_type -> bytebase.v1.CreateIssueCommentRequest+ 29, // 48: bytebase.v1.IssueService.UpdateIssueComment:input_type -> bytebase.v1.UpdateIssueCommentRequest+ 15, // 49: bytebase.v1.IssueService.BatchUpdateIssuesStatus:input_type -> bytebase.v1.BatchUpdateIssuesStatusRequest+ 17, // 50: bytebase.v1.IssueService.ApproveIssue:input_type -> bytebase.v1.ApproveIssueRequest+ 18, // 51: bytebase.v1.IssueService.RejectIssue:input_type -> bytebase.v1.RejectIssueRequest+ 19, // 52: bytebase.v1.IssueService.RequestIssue:input_type -> bytebase.v1.RequestIssueRequest+ 20, // 53: bytebase.v1.IssueService.GetIssue:output_type -> bytebase.v1.Issue+ 20, // 54: bytebase.v1.IssueService.CreateIssue:output_type -> bytebase.v1.Issue+ 11, // 55: bytebase.v1.IssueService.ListIssues:output_type -> bytebase.v1.ListIssuesResponse+ 13, // 56: bytebase.v1.IssueService.SearchIssues:output_type -> bytebase.v1.SearchIssuesResponse+ 20, // 57: bytebase.v1.IssueService.UpdateIssue:output_type -> bytebase.v1.Issue+ 27, // 58: bytebase.v1.IssueService.ListIssueComments:output_type -> bytebase.v1.ListIssueCommentsResponse+ 30, // 59: bytebase.v1.IssueService.CreateIssueComment:output_type -> bytebase.v1.IssueComment+ 30, // 60: bytebase.v1.IssueService.UpdateIssueComment:output_type -> bytebase.v1.IssueComment+ 16, // 61: bytebase.v1.IssueService.BatchUpdateIssuesStatus:output_type -> bytebase.v1.BatchUpdateIssuesStatusResponse+ 20, // 62: bytebase.v1.IssueService.ApproveIssue:output_type -> bytebase.v1.Issue+ 20, // 63: bytebase.v1.IssueService.RejectIssue:output_type -> bytebase.v1.Issue+ 20, // 64: bytebase.v1.IssueService.RequestIssue:output_type -> bytebase.v1.Issue+ 53, // [53:65] is the sub-list for method output_type+ 41, // [41:53] is the sub-list for method input_type+ 41, // [41:41] is the sub-list for extension type_name+ 41, // [41:41] is the sub-list for extension extendee+ 0, // [0:41] is the sub-list for field type_name}func init() { file_v1_issue_service_proto_init() }@@ -3072,10 +2961,6 @@ func file_v1_issue_service_proto_init() {return}file_v1_annotation_proto_init()- file_v1_issue_service_proto_msgTypes[17].OneofWrappers = []any{- (*ApprovalNode_GroupValue_)(nil),- (*ApprovalNode_Role)(nil),- }file_v1_issue_service_proto_msgTypes[22].OneofWrappers = []any{(*IssueComment_Approval_)(nil),(*IssueComment_IssueUpdate_)(nil),@@ -3091,7 +2976,7 @@ func file_v1_issue_service_proto_init() {File: protoimpl.DescBuilder{GoPackagePath: reflect.TypeOf(x{}).PkgPath(),RawDescriptor: unsafe.Slice(unsafe.StringData(file_v1_issue_service_proto_rawDesc), len(file_v1_issue_service_proto_rawDesc)),- NumEnums: 9,+ NumEnums: 8,NumMessages: 31,NumExtensions: 0,NumServices: 1,diff --git a/proto/v1/issue_service.proto b/proto/v1/issue_service.protoindex 40f442045a..53deaf823e 100644--- a/proto/v1/issue_service.proto+++ b/proto/v1/issue_service.proto@@ -456,23 +456,7 @@ message ApprovalNode {}Type type = 1;- // The predefined user groups are:- // - WORKSPACE_OWNER- // - WORKSPACE_DBA- // - PROJECT_OWNER- // - PROJECT_MEMBER- enum GroupValue {- GROUP_VALUE_UNSPECIFILED = 0;- WORKSPACE_OWNER = 1;- WORKSPACE_DBA = 2;- PROJECT_OWNER = 3;- PROJECT_MEMBER = 4;- }- oneof payload {- GroupValue group_value = 2;- // Format: roles/{role}- string role = 3;- }+ string role = 2;}message ListIssueCommentsRequest {