Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
feat: create activity after approving review (#5224)
p0ny53eb7558a542
diff --git a/backend/api/v1/review_service.go b/backend/api/v1/review_service.goindex 8f2d1f9e9b..5a930c6f6b 100644--- a/backend/api/v1/review_service.go+++ b/backend/api/v1/review_service.go@@ -4,6 +4,7 @@ import ("context""fmt"+ "go.uber.org/zap""google.golang.org/grpc/codes""google.golang.org/grpc/status""google.golang.org/protobuf/encoding/protojson"@@ -11,6 +12,8 @@ import ("github.com/pkg/errors""github.com/bytebase/bytebase/backend/common"+ "github.com/bytebase/bytebase/backend/common/log"+ "github.com/bytebase/bytebase/backend/component/activity"api "github.com/bytebase/bytebase/backend/legacyapi""github.com/bytebase/bytebase/backend/store"storepb "github.com/bytebase/bytebase/proto/generated-go/store"@@ -20,13 +23,15 @@ import (// ReviewService implements the review service.type ReviewService struct {v1pb.UnimplementedReviewServiceServer- store *store.Store+ store *store.Store+ activityManager *activity.Manager}// NewReviewService creates a new ReviewService.-func NewReviewService(store *store.Store) *ReviewService {+func NewReviewService(store *store.Store, activityManager *activity.Manager) *ReviewService {return &ReviewService{- store: store,+ store: store,+ activityManager: activityManager,}}@@ -112,6 +117,33 @@ func (s *ReviewService) ApproveReview(ctx context.Context, request *v1pb.Approvereturn nil, status.Errorf(codes.Internal, "failed to update issue, error: %v", err)}+ // It's ok to fail to create activity.+ if err := func() error {+ activityPayload, err := protojson.Marshal(&storepb.ActivityIssueCommentCreatePayload{+ Event: &storepb.ActivityIssueCommentCreatePayload_ApprovalEvent_{+ ApprovalEvent: &storepb.ActivityIssueCommentCreatePayload_ApprovalEvent{+ Status: storepb.ActivityIssueCommentCreatePayload_ApprovalEvent_APPROVED,+ },+ },+ IssueName: issue.Title,+ })+ if err != nil {+ return err+ }+ create := &api.ActivityCreate{+ CreatorID: principalID,+ ContainerID: issue.UID,+ Type: api.ActivityIssueCommentCreate,+ Level: api.ActivityInfo,+ Comment: "",+ Payload: string(activityPayload),+ }+ _, err = s.activityManager.CreateActivity(ctx, create, &activity.Metadata{})+ return err+ }(); err != nil {+ log.Error("failed to create activity after approving review", zap.Error(err))+ }+review, err := convertToReview(ctx, s.store, issue)if err != nil {return nil, status.Errorf(codes.Internal, "failed to convert to review, error: %v", err)diff --git a/backend/server/server.go b/backend/server/server.goindex 7e5994d697..40c7117f1d 100644--- a/backend/server/server.go+++ b/backend/server/server.go@@ -551,7 +551,7 @@ func NewServer(ctx context.Context, profile config.Profile) (*Server, error) {v1pb.RegisterSQLServiceServer(s.grpcServer, v1.NewSQLService())v1pb.RegisterExternalVersionControlServiceServer(s.grpcServer, v1.NewExternalVersionControlService(s.store))v1pb.RegisterRiskServiceServer(s.grpcServer, v1.NewRiskService(s.store))- v1pb.RegisterReviewServiceServer(s.grpcServer, v1.NewReviewService(s.store))+ v1pb.RegisterReviewServiceServer(s.grpcServer, v1.NewReviewService(s.store, s.ActivityManager))reflection.Register(s.grpcServer)// REST gateway proxy.diff --git a/frontend/src/types/proto/google/protobuf/descriptor.ts b/frontend/src/types/proto/google/protobuf/descriptor.tsindex 71146cb3cc..732b3e57d6 100644--- a/frontend/src/types/proto/google/protobuf/descriptor.ts+++ b/frontend/src/types/proto/google/protobuf/descriptor.ts@@ -42,13 +42,9 @@ export interface FileDescriptorProto {sourceCodeInfo?: SourceCodeInfo;/*** The syntax of the proto file.- * The supported values are "proto2", "proto3", and "editions".- *- * If `edition` is present, this value must be "editions".+ * The supported values are "proto2" and "proto3".*/syntax: string;- /** The edition of the proto file, which is an opaque string. */- edition: string;}/** Describes a message type. */@@ -623,10 +619,6 @@ export interface MessageOptions {*/deprecated: boolean;/**- * NOTE: Do not set the option in .proto files. Always use the maps syntax- * instead. The option should only be implicitly set by the proto compiler- * parser.- ** Whether the message is an automatically generated map entry type for the* maps field.*@@ -644,23 +636,12 @@ export interface MessageOptions {* use a native map in the target language to hold the keys and values.* The reflection APIs in such implementations still need to work as* if the field is a repeated message field.- */- mapEntry: boolean;- /**- * Enable the legacy handling of JSON field name conflicts. This lowercases- * and strips underscored from the fields before comparison in proto3 only.- * The new behavior takes `json_name` into account and applies to proto2 as- * well.- *- * This should only be used as a temporary measure against broken builds due- * to the change in behavior for JSON field name conflicts.*- * TODO(b/261750190) This is legacy behavior we plan to remove once downstream- * teams have had time to migrate.- *- * @deprecated+ * NOTE: Do not set the option in .proto files. Always use the maps syntax+ * instead. The option should only be implicitly set by the proto compiler+ * parser.*/- deprecatedLegacyJsonFieldConflicts: boolean;+ mapEntry: boolean;/** The parser stores options it doesn't recognize here. See above. */uninterpretedOption: UninterpretedOption[];}@@ -724,8 +705,11 @@ export interface FieldOptions {* check its required fields, regardless of whether or not the message has* been parsed.*- * As of May 2022, lazy verifies the contents of the byte stream during- * parsing. An invalid byte stream will cause the overall parsing to fail.+ * As of 2021, lazy does no correctness checks on the byte stream during+ * parsing. This may lead to crashes if and when an invalid byte stream is+ * finally parsed upon access.+ *+ * TODO(b/211906113): Enable validation on lazy fields.*/lazy: boolean;/**@@ -743,13 +727,6 @@ export interface FieldOptions {deprecated: boolean;/** For Google-internal migration only. Do not use. */weak: boolean;- /**- * Indicate that the field value should not be printed out when using debug- * formats, e.g. when the field contains sensitive credentials.- */- debugRedact: boolean;- retention: FieldOptions_OptionRetention;- target: FieldOptions_OptionTargetType;/** The parser stores options it doesn't recognize here. See above. */uninterpretedOption: UninterpretedOption[];}@@ -836,137 +813,6 @@ export function fieldOptions_JSTypeToJSON(object: FieldOptions_JSType): string {}}-/**- * If set to RETENTION_SOURCE, the option will be omitted from the binary.- * Note: as of January 2023, support for this is in progress and does not yet- * have an effect (b/264593489).- */-export enum FieldOptions_OptionRetention {- RETENTION_UNKNOWN = 0,- RETENTION_RUNTIME = 1,- RETENTION_SOURCE = 2,- UNRECOGNIZED = -1,-}--export function fieldOptions_OptionRetentionFromJSON(object: any): FieldOptions_OptionRetention {- switch (object) {- case 0:- case "RETENTION_UNKNOWN":- return FieldOptions_OptionRetention.RETENTION_UNKNOWN;- case 1:- case "RETENTION_RUNTIME":- return FieldOptions_OptionRetention.RETENTION_RUNTIME;- case 2:- case "RETENTION_SOURCE":- return FieldOptions_OptionRetention.RETENTION_SOURCE;- case -1:- case "UNRECOGNIZED":- default:- return FieldOptions_OptionRetention.UNRECOGNIZED;- }-}--export function fieldOptions_OptionRetentionToJSON(object: FieldOptions_OptionRetention): string {- switch (object) {- case FieldOptions_OptionRetention.RETENTION_UNKNOWN:- return "RETENTION_UNKNOWN";- case FieldOptions_OptionRetention.RETENTION_RUNTIME:- return "RETENTION_RUNTIME";- case FieldOptions_OptionRetention.RETENTION_SOURCE:- return "RETENTION_SOURCE";- case FieldOptions_OptionRetention.UNRECOGNIZED:- default:- return "UNRECOGNIZED";- }-}--/**- * This indicates the types of entities that the field may apply to when used- * as an option. If it is unset, then the field may be freely used as an- * option on any kind of entity. Note: as of January 2023, support for this is- * in progress and does not yet have an effect (b/264593489).- */-export enum FieldOptions_OptionTargetType {- TARGET_TYPE_UNKNOWN = 0,- TARGET_TYPE_FILE = 1,- TARGET_TYPE_EXTENSION_RANGE = 2,- TARGET_TYPE_MESSAGE = 3,- TARGET_TYPE_FIELD = 4,- TARGET_TYPE_ONEOF = 5,- TARGET_TYPE_ENUM = 6,- TARGET_TYPE_ENUM_ENTRY = 7,- TARGET_TYPE_SERVICE = 8,- TARGET_TYPE_METHOD = 9,- UNRECOGNIZED = -1,-}--export function fieldOptions_OptionTargetTypeFromJSON(object: any): FieldOptions_OptionTargetType {- switch (object) {- case 0:- case "TARGET_TYPE_UNKNOWN":- return FieldOptions_OptionTargetType.TARGET_TYPE_UNKNOWN;- case 1:- case "TARGET_TYPE_FILE":- return FieldOptions_OptionTargetType.TARGET_TYPE_FILE;- case 2:- case "TARGET_TYPE_EXTENSION_RANGE":- return FieldOptions_OptionTargetType.TARGET_TYPE_EXTENSION_RANGE;- case 3:- case "TARGET_TYPE_MESSAGE":- return FieldOptions_OptionTargetType.TARGET_TYPE_MESSAGE;- case 4:- case "TARGET_TYPE_FIELD":- return FieldOptions_OptionTargetType.TARGET_TYPE_FIELD;- case 5:- case "TARGET_TYPE_ONEOF":- return FieldOptions_OptionTargetType.TARGET_TYPE_ONEOF;- case 6:- case "TARGET_TYPE_ENUM":- return FieldOptions_OptionTargetType.TARGET_TYPE_ENUM;- case 7:- case "TARGET_TYPE_ENUM_ENTRY":- return FieldOptions_OptionTargetType.TARGET_TYPE_ENUM_ENTRY;- case 8:- case "TARGET_TYPE_SERVICE":- return FieldOptions_OptionTargetType.TARGET_TYPE_SERVICE;- case 9:- case "TARGET_TYPE_METHOD":- return FieldOptions_OptionTargetType.TARGET_TYPE_METHOD;- case -1:- case "UNRECOGNIZED":- default:- return FieldOptions_OptionTargetType.UNRECOGNIZED;- }-}--export function fieldOptions_OptionTargetTypeToJSON(object: FieldOptions_OptionTargetType): string {- switch (object) {- case FieldOptions_OptionTargetType.TARGET_TYPE_UNKNOWN:- return "TARGET_TYPE_UNKNOWN";- case FieldOptions_OptionTargetType.TARGET_TYPE_FILE:- return "TARGET_TYPE_FILE";- case FieldOptions_OptionTargetType.TARGET_TYPE_EXTENSION_RANGE:- return "TARGET_TYPE_EXTENSION_RANGE";- case FieldOptions_OptionTargetType.TARGET_TYPE_MESSAGE:- return "TARGET_TYPE_MESSAGE";- case FieldOptions_OptionTargetType.TARGET_TYPE_FIELD:- return "TARGET_TYPE_FIELD";- case FieldOptions_OptionTargetType.TARGET_TYPE_ONEOF:- return "TARGET_TYPE_ONEOF";- case FieldOptions_OptionTargetType.TARGET_TYPE_ENUM:- return "TARGET_TYPE_ENUM";- case FieldOptions_OptionTargetType.TARGET_TYPE_ENUM_ENTRY:- return "TARGET_TYPE_ENUM_ENTRY";- case FieldOptions_OptionTargetType.TARGET_TYPE_SERVICE:- return "TARGET_TYPE_SERVICE";- case FieldOptions_OptionTargetType.TARGET_TYPE_METHOD:- return "TARGET_TYPE_METHOD";- case FieldOptions_OptionTargetType.UNRECOGNIZED:- default:- return "UNRECOGNIZED";- }-}-export interface OneofOptions {/** The parser stores options it doesn't recognize here. See above. */uninterpretedOption: UninterpretedOption[];@@ -985,17 +831,6 @@ export interface EnumOptions {* is a formalization for deprecating enums.*/deprecated: boolean;- /**- * Enable the legacy handling of JSON field name conflicts. This lowercases- * and strips underscored from the fields before comparison in proto3 only.- * The new behavior takes `json_name` into account and applies to proto2 as- * well.- * TODO(b/261750190) Remove this legacy behavior once downstream teams have- * had time to migrate.- *- * @deprecated- */- deprecatedLegacyJsonFieldConflicts: boolean;/** The parser stores options it doesn't recognize here. See above. */uninterpretedOption: UninterpretedOption[];}@@ -1287,57 +1122,10 @@ export interface GeneratedCodeInfo_Annotation {begin: number;/*** Identifies the ending offset in bytes in the generated code that- * relates to the identified object. The end offset should be one past+ * relates to the identified offset. The end offset should be one past* the last relevant byte (so the length of the text = end - begin).*/end: number;- semantic: GeneratedCodeInfo_Annotation_Semantic;-}--/**- * Represents the identified object's effect on the element in the original- * .proto file.- */-export enum GeneratedCodeInfo_Annotation_Semantic {- /** NONE - There is no effect or the effect is indescribable. */- NONE = 0,- /** SET - The element is set or otherwise mutated. */- SET = 1,- /** ALIAS - An alias to the element is returned. */- ALIAS = 2,- UNRECOGNIZED = -1,-}--export function generatedCodeInfo_Annotation_SemanticFromJSON(object: any): GeneratedCodeInfo_Annotation_Semantic {- switch (object) {- case 0:- case "NONE":- return GeneratedCodeInfo_Annotation_Semantic.NONE;- case 1:- case "SET":- return GeneratedCodeInfo_Annotation_Semantic.SET;- case 2:- case "ALIAS":- return GeneratedCodeInfo_Annotation_Semantic.ALIAS;- case -1:- case "UNRECOGNIZED":- default:- return GeneratedCodeInfo_Annotation_Semantic.UNRECOGNIZED;- }-}--export function generatedCodeInfo_Annotation_SemanticToJSON(object: GeneratedCodeInfo_Annotation_Semantic): string {- switch (object) {- case GeneratedCodeInfo_Annotation_Semantic.NONE:- return "NONE";- case GeneratedCodeInfo_Annotation_Semantic.SET:- return "SET";- case GeneratedCodeInfo_Annotation_Semantic.ALIAS:- return "ALIAS";- case GeneratedCodeInfo_Annotation_Semantic.UNRECOGNIZED:- default:- return "UNRECOGNIZED";- }}function createBaseFileDescriptorSet(): FileDescriptorSet {@@ -1414,7 +1202,6 @@ function createBaseFileDescriptorProto(): FileDescriptorProto {options: undefined,sourceCodeInfo: undefined,syntax: "",- edition: "",};}@@ -1460,9 +1247,6 @@ export const FileDescriptorProto = {if (message.syntax !== "") {writer.uint32(98).string(message.syntax);}- if (message.edition !== "") {- writer.uint32(106).string(message.edition);- }return writer;},@@ -1575,13 +1359,6 @@ export const FileDescriptorProto = {message.syntax = reader.string();continue;- case 13:- if (tag != 106) {- break;- }-- message.edition = reader.string();- continue;}if ((tag & 7) == 4 || tag == 0) {break;@@ -1611,7 +1388,6 @@ export const FileDescriptorProto = {options: isSet(object.options) ? FileOptions.fromJSON(object.options) : undefined,sourceCodeInfo: isSet(object.sourceCodeInfo) ? SourceCodeInfo.fromJSON(object.sourceCodeInfo) : undefined,syntax: isSet(object.syntax) ? String(object.syntax) : "",- edition: isSet(object.edition) ? String(object.edition) : "",};},@@ -1658,7 +1434,6 @@ export const FileDescriptorProto = {message.sourceCodeInfo !== undefined &&(obj.sourceCodeInfo = message.sourceCodeInfo ? SourceCodeInfo.toJSON(message.sourceCodeInfo) : undefined);message.syntax !== undefined && (obj.syntax = message.syntax);- message.edition !== undefined && (obj.edition = message.edition);return obj;},@@ -1684,7 +1459,6 @@ export const FileDescriptorProto = {? SourceCodeInfo.fromPartial(object.sourceCodeInfo): undefined;message.syntax = object.syntax ?? "";- message.edition = object.edition ?? "";return message;},};@@ -3277,7 +3051,6 @@ function createBaseMessageOptions(): MessageOptions {noStandardDescriptorAccessor: false,deprecated: false,mapEntry: false,- deprecatedLegacyJsonFieldConflicts: false,uninterpretedOption: [],};}@@ -3296,9 +3069,6 @@ export const MessageOptions = {if (message.mapEntry === true) {writer.uint32(56).bool(message.mapEntry);}- if (message.deprecatedLegacyJsonFieldConflicts === true) {- writer.uint32(88).bool(message.deprecatedLegacyJsonFieldConflicts);- }for (const v of message.uninterpretedOption) {UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim();}@@ -3340,13 +3110,6 @@ export const MessageOptions = {message.mapEntry = reader.bool();continue;- case 11:- if (tag != 88) {- break;- }-- message.deprecatedLegacyJsonFieldConflicts = reader.bool();- continue;case 999:if (tag != 7994) {break;@@ -3371,9 +3134,6 @@ export const MessageOptions = {: false,deprecated: isSet(object.deprecated) ? Boolean(object.deprecated) : false,mapEntry: isSet(object.mapEntry) ? Boolean(object.mapEntry) : false,- deprecatedLegacyJsonFieldConflicts: isSet(object.deprecatedLegacyJsonFieldConflicts)- ? Boolean(object.deprecatedLegacyJsonFieldConflicts)- : false,uninterpretedOption: Array.isArray(object?.uninterpretedOption)? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e)): [],@@ -3387,8 +3147,6 @@ export const MessageOptions = {(obj.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor);message.deprecated !== undefined && (obj.deprecated = message.deprecated);message.mapEntry !== undefined && (obj.mapEntry = message.mapEntry);- message.deprecatedLegacyJsonFieldConflicts !== undefined &&- (obj.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts);if (message.uninterpretedOption) {obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined);} else {@@ -3407,7 +3165,6 @@ export const MessageOptions = {message.noStandardDescriptorAccessor = object.noStandardDescriptorAccessor ?? false;message.deprecated = object.deprecated ?? false;message.mapEntry = object.mapEntry ?? false;- message.deprecatedLegacyJsonFieldConflicts = object.deprecatedLegacyJsonFieldConflicts ?? false;message.uninterpretedOption = object.uninterpretedOption?.map((e) => UninterpretedOption.fromPartial(e)) || [];return message;},@@ -3422,9 +3179,6 @@ function createBaseFieldOptions(): FieldOptions {unverifiedLazy: false,deprecated: false,weak: false,- debugRedact: false,- retention: 0,- target: 0,uninterpretedOption: [],};}@@ -3452,15 +3206,6 @@ export const FieldOptions = {if (message.weak === true) {writer.uint32(80).bool(message.weak);}- if (message.debugRedact === true) {- writer.uint32(128).bool(message.debugRedact);- }- if (message.retention !== 0) {- writer.uint32(136).int32(message.retention);- }- if (message.target !== 0) {- writer.uint32(144).int32(message.target);- }for (const v of message.uninterpretedOption) {UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim();}@@ -3523,27 +3268,6 @@ export const FieldOptions = {message.weak = reader.bool();continue;- case 16:- if (tag != 128) {- break;- }-- message.debugRedact = reader.bool();- continue;- case 17:- if (tag != 136) {- break;- }-- message.retention = reader.int32() as any;- continue;- case 18:- if (tag != 144) {- break;- }-- message.target = reader.int32() as any;- continue;case 999:if (tag != 7994) {break;@@ -3569,9 +3293,6 @@ export const FieldOptions = {unverifiedLazy: isSet(object.unverifiedLazy) ? Boolean(object.unverifiedLazy) : false,deprecated: isSet(object.deprecated) ? Boolean(object.deprecated) : false,weak: isSet(object.weak) ? Boolean(object.weak) : false,- debugRedact: isSet(object.debugRedact) ? Boolean(object.debugRedact) : false,- retention: isSet(object.retention) ? fieldOptions_OptionRetentionFromJSON(object.retention) : 0,- target: isSet(object.target) ? fieldOptions_OptionTargetTypeFromJSON(object.target) : 0,uninterpretedOption: Array.isArray(object?.uninterpretedOption)? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e)): [],@@ -3587,9 +3308,6 @@ export const FieldOptions = {message.unverifiedLazy !== undefined && (obj.unverifiedLazy = message.unverifiedLazy);message.deprecated !== undefined && (obj.deprecated = message.deprecated);message.weak !== undefined && (obj.weak = message.weak);- message.debugRedact !== undefined && (obj.debugRedact = message.debugRedact);- message.retention !== undefined && (obj.retention = fieldOptions_OptionRetentionToJSON(message.retention));- message.target !== undefined && (obj.target = fieldOptions_OptionTargetTypeToJSON(message.target));if (message.uninterpretedOption) {obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined);} else {@@ -3611,9 +3329,6 @@ export const FieldOptions = {message.unverifiedLazy = object.unverifiedLazy ?? false;message.deprecated = object.deprecated ?? false;message.weak = object.weak ?? false;- message.debugRedact = object.debugRedact ?? false;- message.retention = object.retention ?? 0;- message.target = object.target ?? 0;message.uninterpretedOption = object.uninterpretedOption?.map((e) => UninterpretedOption.fromPartial(e)) || [];return message;},@@ -3684,7 +3399,7 @@ export const OneofOptions = {};function createBaseEnumOptions(): EnumOptions {- return { allowAlias: false, deprecated: false, deprecatedLegacyJsonFieldConflicts: false, uninterpretedOption: [] };+ return { allowAlias: false, deprecated: false, uninterpretedOption: [] };}export const EnumOptions = {@@ -3695,9 +3410,6 @@ export const EnumOptions = {if (message.deprecated === true) {writer.uint32(24).bool(message.deprecated);}- if (message.deprecatedLegacyJsonFieldConflicts === true) {- writer.uint32(48).bool(message.deprecatedLegacyJsonFieldConflicts);- }for (const v of message.uninterpretedOption) {UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim();}@@ -3725,13 +3437,6 @@ export const EnumOptions = {message.deprecated = reader.bool();continue;- case 6:- if (tag != 48) {- break;- }-- message.deprecatedLegacyJsonFieldConflicts = reader.bool();- continue;case 999:if (tag != 7994) {break;@@ -3752,9 +3457,6 @@ export const EnumOptions = {return {allowAlias: isSet(object.allowAlias) ? Boolean(object.allowAlias) : false,deprecated: isSet(object.deprecated) ? Boolean(object.deprecated) : false,- deprecatedLegacyJsonFieldConflicts: isSet(object.deprecatedLegacyJsonFieldConflicts)- ? Boolean(object.deprecatedLegacyJsonFieldConflicts)- : false,uninterpretedOption: Array.isArray(object?.uninterpretedOption)? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e)): [],@@ -3765,8 +3467,6 @@ export const EnumOptions = {const obj: any = {};message.allowAlias !== undefined && (obj.allowAlias = message.allowAlias);message.deprecated !== undefined && (obj.deprecated = message.deprecated);- message.deprecatedLegacyJsonFieldConflicts !== undefined &&- (obj.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts);if (message.uninterpretedOption) {obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined);} else {@@ -3783,7 +3483,6 @@ export const EnumOptions = {const message = createBaseEnumOptions();message.allowAlias = object.allowAlias ?? false;message.deprecated = object.deprecated ?? false;- message.deprecatedLegacyJsonFieldConflicts = object.deprecatedLegacyJsonFieldConflicts ?? false;message.uninterpretedOption = object.uninterpretedOption?.map((e) => UninterpretedOption.fromPartial(e)) || [];return message;},@@ -4531,7 +4230,7 @@ export const GeneratedCodeInfo = {};function createBaseGeneratedCodeInfo_Annotation(): GeneratedCodeInfo_Annotation {- return { path: [], sourceFile: "", begin: 0, end: 0, semantic: 0 };+ return { path: [], sourceFile: "", begin: 0, end: 0 };}export const GeneratedCodeInfo_Annotation = {@@ -4550,9 +4249,6 @@ export const GeneratedCodeInfo_Annotation = {if (message.end !== 0) {writer.uint32(32).int32(message.end);}- if (message.semantic !== 0) {- writer.uint32(40).int32(message.semantic);- }return writer;},@@ -4600,13 +4296,6 @@ export const GeneratedCodeInfo_Annotation = {message.end = reader.int32();continue;- case 5:- if (tag != 40) {- break;- }-- message.semantic = reader.int32() as any;- continue;}if ((tag & 7) == 4 || tag == 0) {break;@@ -4622,7 +4311,6 @@ export const GeneratedCodeInfo_Annotation = {sourceFile: isSet(object.sourceFile) ? String(object.sourceFile) : "",begin: isSet(object.begin) ? Number(object.begin) : 0,end: isSet(object.end) ? Number(object.end) : 0,- semantic: isSet(object.semantic) ? generatedCodeInfo_Annotation_SemanticFromJSON(object.semantic) : 0,};},@@ -4636,7 +4324,6 @@ export const GeneratedCodeInfo_Annotation = {message.sourceFile !== undefined && (obj.sourceFile = message.sourceFile);message.begin !== undefined && (obj.begin = Math.round(message.begin));message.end !== undefined && (obj.end = Math.round(message.end));- message.semantic !== undefined && (obj.semantic = generatedCodeInfo_Annotation_SemanticToJSON(message.semantic));return obj;},@@ -4650,7 +4337,6 @@ export const GeneratedCodeInfo_Annotation = {message.sourceFile = object.sourceFile ?? "";message.begin = object.begin ?? 0;message.end = object.end ?? 0;- message.semantic = object.semantic ?? 0;return message;},};diff --git a/frontend/src/types/proto/store/activity.ts b/frontend/src/types/proto/store/activity.tsindex edfb0d2b7e..10f78d4531 100644--- a/frontend/src/types/proto/store/activity.ts+++ b/frontend/src/types/proto/store/activity.ts@@ -24,8 +24,9 @@ export interface ActivityIssueCreatePayload {/** ActivityIssueCommentCreatePayload is the payloads for creating issue comments. */export interface ActivityIssueCommentCreatePayload {externalApprovalEvent?: ActivityIssueCommentCreatePayload_ExternalApprovalEvent | undefined;- taskRollbackBy?:- | ActivityIssueCommentCreatePayload_TaskRollbackBy+ taskRollbackBy?: ActivityIssueCommentCreatePayload_TaskRollbackBy | undefined;+ approvalEvent?:+ | ActivityIssueCommentCreatePayload_ApprovalEvent| undefined;/** Used by inbox to display info without paying the join cost */issueName: string;@@ -128,6 +129,54 @@ export function activityIssueCommentCreatePayload_ExternalApprovalEvent_ActionTo}}+export interface ActivityIssueCommentCreatePayload_ApprovalEvent {+ /** The new status. */+ status: ActivityIssueCommentCreatePayload_ApprovalEvent_Status;+}++export enum ActivityIssueCommentCreatePayload_ApprovalEvent_Status {+ STATUS_UNSPECIFIED = 0,+ PENDING = 1,+ APPROVED = 2,+ UNRECOGNIZED = -1,+}++export function activityIssueCommentCreatePayload_ApprovalEvent_StatusFromJSON(+ object: any,+): ActivityIssueCommentCreatePayload_ApprovalEvent_Status {+ switch (object) {+ case 0:+ case "STATUS_UNSPECIFIED":+ return ActivityIssueCommentCreatePayload_ApprovalEvent_Status.STATUS_UNSPECIFIED;+ case 1:+ case "PENDING":+ return ActivityIssueCommentCreatePayload_ApprovalEvent_Status.PENDING;+ case 2:+ case "APPROVED":+ return ActivityIssueCommentCreatePayload_ApprovalEvent_Status.APPROVED;+ case -1:+ case "UNRECOGNIZED":+ default:+ return ActivityIssueCommentCreatePayload_ApprovalEvent_Status.UNRECOGNIZED;+ }+}++export function activityIssueCommentCreatePayload_ApprovalEvent_StatusToJSON(+ object: ActivityIssueCommentCreatePayload_ApprovalEvent_Status,+): string {+ switch (object) {+ case ActivityIssueCommentCreatePayload_ApprovalEvent_Status.STATUS_UNSPECIFIED:+ return "STATUS_UNSPECIFIED";+ case ActivityIssueCommentCreatePayload_ApprovalEvent_Status.PENDING:+ return "PENDING";+ case ActivityIssueCommentCreatePayload_ApprovalEvent_Status.APPROVED:+ return "APPROVED";+ case ActivityIssueCommentCreatePayload_ApprovalEvent_Status.UNRECOGNIZED:+ default:+ return "UNRECOGNIZED";+ }+}+function createBaseActivityPayload(): ActivityPayload {return { issueCreatePayload: undefined, issueCommentCreatePayload: undefined };}@@ -270,7 +319,7 @@ export const ActivityIssueCreatePayload = {};function createBaseActivityIssueCommentCreatePayload(): ActivityIssueCommentCreatePayload {- return { externalApprovalEvent: undefined, taskRollbackBy: undefined, issueName: "" };+ return { externalApprovalEvent: undefined, taskRollbackBy: undefined, approvalEvent: undefined, issueName: "" };}export const ActivityIssueCommentCreatePayload = {@@ -285,8 +334,11 @@ export const ActivityIssueCommentCreatePayload = {ActivityIssueCommentCreatePayload_TaskRollbackBy.encode(message.taskRollbackBy, writer.uint32(18).fork()).ldelim();}+ if (message.approvalEvent !== undefined) {+ ActivityIssueCommentCreatePayload_ApprovalEvent.encode(message.approvalEvent, writer.uint32(26).fork()).ldelim();+ }if (message.issueName !== "") {- writer.uint32(26).string(message.issueName);+ writer.uint32(34).string(message.issueName);}return writer;},@@ -320,6 +372,13 @@ export const ActivityIssueCommentCreatePayload = {break;}+ message.approvalEvent = ActivityIssueCommentCreatePayload_ApprovalEvent.decode(reader, reader.uint32());+ continue;+ case 4:+ if (tag != 34) {+ break;+ }+message.issueName = reader.string();continue;}@@ -339,6 +398,9 @@ export const ActivityIssueCommentCreatePayload = {taskRollbackBy: isSet(object.taskRollbackBy)? ActivityIssueCommentCreatePayload_TaskRollbackBy.fromJSON(object.taskRollbackBy): undefined,+ approvalEvent: isSet(object.approvalEvent)+ ? ActivityIssueCommentCreatePayload_ApprovalEvent.fromJSON(object.approvalEvent)+ : undefined,issueName: isSet(object.issueName) ? String(object.issueName) : "",};},@@ -351,6 +413,9 @@ export const ActivityIssueCommentCreatePayload = {message.taskRollbackBy !== undefined && (obj.taskRollbackBy = message.taskRollbackBy? ActivityIssueCommentCreatePayload_TaskRollbackBy.toJSON(message.taskRollbackBy): undefined);+ message.approvalEvent !== undefined && (obj.approvalEvent = message.approvalEvent+ ? ActivityIssueCommentCreatePayload_ApprovalEvent.toJSON(message.approvalEvent)+ : undefined);message.issueName !== undefined && (obj.issueName = message.issueName);return obj;},@@ -368,6 +433,9 @@ export const ActivityIssueCommentCreatePayload = {message.taskRollbackBy = (object.taskRollbackBy !== undefined && object.taskRollbackBy !== null)? ActivityIssueCommentCreatePayload_TaskRollbackBy.fromPartial(object.taskRollbackBy): undefined;+ message.approvalEvent = (object.approvalEvent !== undefined && object.approvalEvent !== null)+ ? ActivityIssueCommentCreatePayload_ApprovalEvent.fromPartial(object.approvalEvent)+ : undefined;message.issueName = object.issueName ?? "";return message;},@@ -572,6 +640,72 @@ export const ActivityIssueCommentCreatePayload_ExternalApprovalEvent = {},};+function createBaseActivityIssueCommentCreatePayload_ApprovalEvent(): ActivityIssueCommentCreatePayload_ApprovalEvent {+ return { status: 0 };+}++export const ActivityIssueCommentCreatePayload_ApprovalEvent = {+ encode(+ message: ActivityIssueCommentCreatePayload_ApprovalEvent,+ writer: _m0.Writer = _m0.Writer.create(),+ ): _m0.Writer {+ if (message.status !== 0) {+ writer.uint32(8).int32(message.status);+ }+ return writer;+ },++ decode(input: _m0.Reader | Uint8Array, length?: number): ActivityIssueCommentCreatePayload_ApprovalEvent {+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);+ let end = length === undefined ? reader.len : reader.pos + length;+ const message = createBaseActivityIssueCommentCreatePayload_ApprovalEvent();+ while (reader.pos < end) {+ const tag = reader.uint32();+ switch (tag >>> 3) {+ case 1:+ if (tag != 8) {+ break;+ }++ message.status = reader.int32() as any;+ continue;+ }+ if ((tag & 7) == 4 || tag == 0) {+ break;+ }+ reader.skipType(tag & 7);+ }+ return message;+ },++ fromJSON(object: any): ActivityIssueCommentCreatePayload_ApprovalEvent {+ return {+ status: isSet(object.status) ? activityIssueCommentCreatePayload_ApprovalEvent_StatusFromJSON(object.status) : 0,+ };+ },++ toJSON(message: ActivityIssueCommentCreatePayload_ApprovalEvent): unknown {+ const obj: any = {};+ message.status !== undefined &&+ (obj.status = activityIssueCommentCreatePayload_ApprovalEvent_StatusToJSON(message.status));+ return obj;+ },++ create(+ base?: DeepPartial<ActivityIssueCommentCreatePayload_ApprovalEvent>,+ ): ActivityIssueCommentCreatePayload_ApprovalEvent {+ return ActivityIssueCommentCreatePayload_ApprovalEvent.fromPartial(base ?? {});+ },++ fromPartial(+ object: DeepPartial<ActivityIssueCommentCreatePayload_ApprovalEvent>,+ ): ActivityIssueCommentCreatePayload_ApprovalEvent {+ const message = createBaseActivityIssueCommentCreatePayload_ApprovalEvent();+ message.status = object.status ?? 0;+ return message;+ },+};+declare var self: any | undefined;declare var window: any | undefined;declare var global: any | undefined;diff --git a/proto/gen/grpc-doc/store/README.md b/proto/gen/grpc-doc/store/README.mdindex 6eafa7eb0a..9b7201b1c9 100644--- a/proto/gen/grpc-doc/store/README.md+++ b/proto/gen/grpc-doc/store/README.md@@ -5,11 +5,13 @@- [store/activity.proto](#store_activity-proto)- [ActivityIssueCommentCreatePayload](#bytebase-store-ActivityIssueCommentCreatePayload)+ - [ActivityIssueCommentCreatePayload.ApprovalEvent](#bytebase-store-ActivityIssueCommentCreatePayload-ApprovalEvent)- [ActivityIssueCommentCreatePayload.ExternalApprovalEvent](#bytebase-store-ActivityIssueCommentCreatePayload-ExternalApprovalEvent)- [ActivityIssueCommentCreatePayload.TaskRollbackBy](#bytebase-store-ActivityIssueCommentCreatePayload-TaskRollbackBy)- [ActivityIssueCreatePayload](#bytebase-store-ActivityIssueCreatePayload)- [ActivityPayload](#bytebase-store-ActivityPayload)+ - [ActivityIssueCommentCreatePayload.ApprovalEvent.Status](#bytebase-store-ActivityIssueCommentCreatePayload-ApprovalEvent-Status)- [ActivityIssueCommentCreatePayload.ExternalApprovalEvent.Action](#bytebase-store-ActivityIssueCommentCreatePayload-ExternalApprovalEvent-Action)- [ActivityIssueCommentCreatePayload.ExternalApprovalEvent.Type](#bytebase-store-ActivityIssueCommentCreatePayload-ExternalApprovalEvent-Type)@@ -83,6 +85,7 @@ ActivityIssueCommentCreatePayload is the payloads for creating issue comments.| ----- | ---- | ----- | ----------- || external_approval_event | [ActivityIssueCommentCreatePayload.ExternalApprovalEvent](#bytebase-store-ActivityIssueCommentCreatePayload-ExternalApprovalEvent) | | || task_rollback_by | [ActivityIssueCommentCreatePayload.TaskRollbackBy](#bytebase-store-ActivityIssueCommentCreatePayload-TaskRollbackBy) | | |+| approval_event | [ActivityIssueCommentCreatePayload.ApprovalEvent](#bytebase-store-ActivityIssueCommentCreatePayload-ApprovalEvent) | | || issue_name | [string](#string) | | Used by inbox to display info without paying the join cost |@@ -90,6 +93,21 @@ ActivityIssueCommentCreatePayload is the payloads for creating issue comments.+<a name="bytebase-store-ActivityIssueCommentCreatePayload-ApprovalEvent"></a>++### ActivityIssueCommentCreatePayload.ApprovalEvent++++| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| status | [ActivityIssueCommentCreatePayload.ApprovalEvent.Status](#bytebase-store-ActivityIssueCommentCreatePayload-ApprovalEvent-Status) | | The new status. |++++++<a name="bytebase-store-ActivityIssueCommentCreatePayload-ExternalApprovalEvent"></a>### ActivityIssueCommentCreatePayload.ExternalApprovalEvent@@ -163,6 +181,19 @@ convert to the expected struct there.+<a name="bytebase-store-ActivityIssueCommentCreatePayload-ApprovalEvent-Status"></a>++### ActivityIssueCommentCreatePayload.ApprovalEvent.Status+++| Name | Number | Description |+| ---- | ------ | ----------- |+| STATUS_UNSPECIFIED | 0 | |+| PENDING | 1 | |+| APPROVED | 2 | |+++<a name="bytebase-store-ActivityIssueCommentCreatePayload-ExternalApprovalEvent-Action"></a>### ActivityIssueCommentCreatePayload.ExternalApprovalEvent.Actiondiff --git a/proto/generated-go/store/activity.pb.go b/proto/generated-go/store/activity.pb.goindex 3ba0734d93..2febf16f71 100644--- a/proto/generated-go/store/activity.pb.go+++ b/proto/generated-go/store/activity.pb.go@@ -115,6 +115,55 @@ func (ActivityIssueCommentCreatePayload_ExternalApprovalEvent_Action) EnumDescrireturn file_store_activity_proto_rawDescGZIP(), []int{2, 1, 1}}+type ActivityIssueCommentCreatePayload_ApprovalEvent_Status int32++const (+ ActivityIssueCommentCreatePayload_ApprovalEvent_STATUS_UNSPECIFIED ActivityIssueCommentCreatePayload_ApprovalEvent_Status = 0+ ActivityIssueCommentCreatePayload_ApprovalEvent_PENDING ActivityIssueCommentCreatePayload_ApprovalEvent_Status = 1+ ActivityIssueCommentCreatePayload_ApprovalEvent_APPROVED ActivityIssueCommentCreatePayload_ApprovalEvent_Status = 2+)++// Enum value maps for ActivityIssueCommentCreatePayload_ApprovalEvent_Status.+var (+ ActivityIssueCommentCreatePayload_ApprovalEvent_Status_name = map[int32]string{+ 0: "STATUS_UNSPECIFIED",+ 1: "PENDING",+ 2: "APPROVED",+ }+ ActivityIssueCommentCreatePayload_ApprovalEvent_Status_value = map[string]int32{+ "STATUS_UNSPECIFIED": 0,+ "PENDING": 1,+ "APPROVED": 2,+ }+)++func (x ActivityIssueCommentCreatePayload_ApprovalEvent_Status) Enum() *ActivityIssueCommentCreatePayload_ApprovalEvent_Status {+ p := new(ActivityIssueCommentCreatePayload_ApprovalEvent_Status)+ *p = x+ return p+}++func (x ActivityIssueCommentCreatePayload_ApprovalEvent_Status) String() string {+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))+}++func (ActivityIssueCommentCreatePayload_ApprovalEvent_Status) Descriptor() protoreflect.EnumDescriptor {+ return file_store_activity_proto_enumTypes[2].Descriptor()+}++func (ActivityIssueCommentCreatePayload_ApprovalEvent_Status) Type() protoreflect.EnumType {+ return &file_store_activity_proto_enumTypes[2]+}++func (x ActivityIssueCommentCreatePayload_ApprovalEvent_Status) Number() protoreflect.EnumNumber {+ return protoreflect.EnumNumber(x)+}++// Deprecated: Use ActivityIssueCommentCreatePayload_ApprovalEvent_Status.Descriptor instead.+func (ActivityIssueCommentCreatePayload_ApprovalEvent_Status) EnumDescriptor() ([]byte, []int) {+ return file_store_activity_proto_rawDescGZIP(), []int{2, 2, 0}+}+type ActivityPayload struct {state protoimpl.MessageStatesizeCache protoimpl.SizeCache@@ -259,9 +308,10 @@ type ActivityIssueCommentCreatePayload struct {//// *ActivityIssueCommentCreatePayload_ExternalApprovalEvent_// *ActivityIssueCommentCreatePayload_TaskRollbackBy_+ // *ActivityIssueCommentCreatePayload_ApprovalEvent_Event isActivityIssueCommentCreatePayload_Event `protobuf_oneof:"event"`// Used by inbox to display info without paying the join cost- IssueName string `protobuf:"bytes,3,opt,name=issue_name,json=issueName,proto3" json:"issue_name,omitempty"`+ IssueName string `protobuf:"bytes,4,opt,name=issue_name,json=issueName,proto3" json:"issue_name,omitempty"`}func (x *ActivityIssueCommentCreatePayload) Reset() {@@ -317,6 +367,13 @@ func (x *ActivityIssueCommentCreatePayload) GetTaskRollbackBy() *ActivityIssueCoreturn nil}+func (x *ActivityIssueCommentCreatePayload) GetApprovalEvent() *ActivityIssueCommentCreatePayload_ApprovalEvent {+ if x, ok := x.GetEvent().(*ActivityIssueCommentCreatePayload_ApprovalEvent_); ok {+ return x.ApprovalEvent+ }+ return nil+}+func (x *ActivityIssueCommentCreatePayload) GetIssueName() string {if x != nil {return x.IssueName@@ -336,12 +393,19 @@ type ActivityIssueCommentCreatePayload_TaskRollbackBy_ struct {TaskRollbackBy *ActivityIssueCommentCreatePayload_TaskRollbackBy `protobuf:"bytes,2,opt,name=task_rollback_by,json=taskRollbackBy,proto3,oneof"`}+type ActivityIssueCommentCreatePayload_ApprovalEvent_ struct {+ ApprovalEvent *ActivityIssueCommentCreatePayload_ApprovalEvent `protobuf:"bytes,3,opt,name=approval_event,json=approvalEvent,proto3,oneof"`+}+func (*ActivityIssueCommentCreatePayload_ExternalApprovalEvent_) isActivityIssueCommentCreatePayload_Event() {}func (*ActivityIssueCommentCreatePayload_TaskRollbackBy_) isActivityIssueCommentCreatePayload_Event() {}+func (*ActivityIssueCommentCreatePayload_ApprovalEvent_) isActivityIssueCommentCreatePayload_Event() {+}+// TaskRollbackBy records an issue rollback activity.// The task with taskID in IssueID is rollbacked by the task with RollbackByTaskID in RollbackByIssueID.type ActivityIssueCommentCreatePayload_TaskRollbackBy struct {@@ -478,6 +542,54 @@ func (x *ActivityIssueCommentCreatePayload_ExternalApprovalEvent) GetStageName()return ""}+type ActivityIssueCommentCreatePayload_ApprovalEvent struct {+ state protoimpl.MessageState+ sizeCache protoimpl.SizeCache+ unknownFields protoimpl.UnknownFields++ // The new status.+ Status ActivityIssueCommentCreatePayload_ApprovalEvent_Status `protobuf:"varint,1,opt,name=status,proto3,enum=bytebase.store.ActivityIssueCommentCreatePayload_ApprovalEvent_Status" json:"status,omitempty"`+}++func (x *ActivityIssueCommentCreatePayload_ApprovalEvent) Reset() {+ *x = ActivityIssueCommentCreatePayload_ApprovalEvent{}+ if protoimpl.UnsafeEnabled {+ mi := &file_store_activity_proto_msgTypes[5]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+ }+}++func (x *ActivityIssueCommentCreatePayload_ApprovalEvent) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*ActivityIssueCommentCreatePayload_ApprovalEvent) ProtoMessage() {}++func (x *ActivityIssueCommentCreatePayload_ApprovalEvent) ProtoReflect() protoreflect.Message {+ mi := &file_store_activity_proto_msgTypes[5]+ if protoimpl.UnsafeEnabled && x != nil {+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ if ms.LoadMessageInfo() == nil {+ ms.StoreMessageInfo(mi)+ }+ return ms+ }+ return mi.MessageOf(x)+}++// Deprecated: Use ActivityIssueCommentCreatePayload_ApprovalEvent.ProtoReflect.Descriptor instead.+func (*ActivityIssueCommentCreatePayload_ApprovalEvent) Descriptor() ([]byte, []int) {+ return file_store_activity_proto_rawDescGZIP(), []int{2, 2}+}++func (x *ActivityIssueCommentCreatePayload_ApprovalEvent) GetStatus() ActivityIssueCommentCreatePayload_ApprovalEvent_Status {+ if x != nil {+ return x.Status+ }+ return ActivityIssueCommentCreatePayload_ApprovalEvent_STATUS_UNSPECIFIED+}+var File_store_activity_proto protoreflect.FileDescriptorvar file_store_activity_proto_rawDesc = []byte{@@ -502,7 +614,7 @@ var file_store_activity_proto_rawDesc = []byte{0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x49, 0x73, 0x73, 0x75, 0x65, 0x43, 0x72, 0x65, 0x61,0x74, 0x65, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x73, 0x73,0x75, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x69,- 0x73, 0x73, 0x75, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0xdf, 0x06, 0x0a, 0x21, 0x41, 0x63, 0x74,+ 0x73, 0x73, 0x75, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0xf8, 0x08, 0x0a, 0x21, 0x41, 0x63, 0x74,0x69, 0x76, 0x69, 0x74, 0x79, 0x49, 0x73, 0x73, 0x75, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e,0x74, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x81,0x01, 0x0a, 0x17, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x61, 0x70, 0x70, 0x72,@@ -520,47 +632,64 @@ var file_store_activity_proto_rawDesc = []byte{0x6e, 0x74, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x2e,0x54, 0x61, 0x73, 0x6b, 0x52, 0x6f, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x42, 0x79, 0x48, 0x00,0x52, 0x0e, 0x74, 0x61, 0x73, 0x6b, 0x52, 0x6f, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x42, 0x79,- 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x73, 0x73, 0x75, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03,- 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x69, 0x73, 0x73, 0x75, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x1a,- 0xa4, 0x01, 0x0a, 0x0e, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x6f, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b,- 0x42, 0x79, 0x12, 0x19, 0x0a, 0x08, 0x69, 0x73, 0x73, 0x75, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01,- 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x69, 0x73, 0x73, 0x75, 0x65, 0x49, 0x64, 0x12, 0x17, 0x0a,- 0x07, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06,- 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x2f, 0x0a, 0x14, 0x72, 0x6f, 0x6c, 0x6c, 0x62, 0x61,- 0x63, 0x6b, 0x5f, 0x62, 0x79, 0x5f, 0x69, 0x73, 0x73, 0x75, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x03,- 0x20, 0x01, 0x28, 0x03, 0x52, 0x11, 0x72, 0x6f, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x42, 0x79,- 0x49, 0x73, 0x73, 0x75, 0x65, 0x49, 0x64, 0x12, 0x2d, 0x0a, 0x13, 0x72, 0x6f, 0x6c, 0x6c, 0x62,- 0x61, 0x63, 0x6b, 0x5f, 0x62, 0x79, 0x5f, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x04,- 0x20, 0x01, 0x28, 0x03, 0x52, 0x10, 0x72, 0x6f, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x42, 0x79,- 0x54, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x1a, 0xf8, 0x02, 0x0a, 0x15, 0x45, 0x78, 0x74, 0x65, 0x72,- 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x61, 0x6c, 0x45, 0x76, 0x65, 0x6e, 0x74,- 0x12, 0x60, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x4c,- 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e,- 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x49, 0x73, 0x73, 0x75, 0x65, 0x43, 0x6f, 0x6d,- 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61,- 0x64, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76,- 0x61, 0x6c, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79,- 0x70, 0x65, 0x12, 0x66, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01,- 0x28, 0x0e, 0x32, 0x4e, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74,- 0x6f, 0x72, 0x65, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x49, 0x73, 0x73, 0x75,- 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x61,- 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70,- 0x70, 0x72, 0x6f, 0x76, 0x61, 0x6c, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x41, 0x63, 0x74, 0x69,- 0x6f, 0x6e, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74,- 0x61, 0x67, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09,- 0x73, 0x74, 0x61, 0x67, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x2d, 0x0a, 0x04, 0x54, 0x79, 0x70,- 0x65, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43,- 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x59, 0x50, 0x45, 0x5f,- 0x46, 0x45, 0x49, 0x53, 0x48, 0x55, 0x10, 0x01, 0x22, 0x47, 0x0a, 0x06, 0x41, 0x63, 0x74, 0x69,- 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x12, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53,- 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x41, 0x43,- 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x41, 0x50, 0x50, 0x52, 0x4f, 0x56, 0x45, 0x10, 0x01, 0x12, 0x11,- 0x0a, 0x0d, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x52, 0x45, 0x4a, 0x45, 0x43, 0x54, 0x10,- 0x02, 0x42, 0x07, 0x0a, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x42, 0x2e, 0x5a, 0x2c, 0x67, 0x69,- 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73,- 0x65, 0x2f, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x70,- 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,- 0x6f, 0x33,+ 0x12, 0x68, 0x0a, 0x0e, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x61, 0x6c, 0x5f, 0x65, 0x76, 0x65,+ 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62,+ 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69,+ 0x74, 0x79, 0x49, 0x73, 0x73, 0x75, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x72,+ 0x65, 0x61, 0x74, 0x65, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x2e, 0x41, 0x70, 0x70, 0x72,+ 0x6f, 0x76, 0x61, 0x6c, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x0d, 0x61, 0x70, 0x70,+ 0x72, 0x6f, 0x76, 0x61, 0x6c, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x73,+ 0x73, 0x75, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09,+ 0x69, 0x73, 0x73, 0x75, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x1a, 0xa4, 0x01, 0x0a, 0x0e, 0x54, 0x61,+ 0x73, 0x6b, 0x52, 0x6f, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x42, 0x79, 0x12, 0x19, 0x0a, 0x08,+ 0x69, 0x73, 0x73, 0x75, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07,+ 0x69, 0x73, 0x73, 0x75, 0x65, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x61, 0x73, 0x6b, 0x5f,+ 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64,+ 0x12, 0x2f, 0x0a, 0x14, 0x72, 0x6f, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x5f, 0x62, 0x79, 0x5f,+ 0x69, 0x73, 0x73, 0x75, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x11,+ 0x72, 0x6f, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x42, 0x79, 0x49, 0x73, 0x73, 0x75, 0x65, 0x49,+ 0x64, 0x12, 0x2d, 0x0a, 0x13, 0x72, 0x6f, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x5f, 0x62, 0x79,+ 0x5f, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x10,+ 0x72, 0x6f, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x42, 0x79, 0x54, 0x61, 0x73, 0x6b, 0x49, 0x64,+ 0x1a, 0xf8, 0x02, 0x0a, 0x15, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x70,+ 0x72, 0x6f, 0x76, 0x61, 0x6c, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x60, 0x0a, 0x04, 0x74, 0x79,+ 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x4c, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62,+ 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69,+ 0x74, 0x79, 0x49, 0x73, 0x73, 0x75, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x72,+ 0x65, 0x61, 0x74, 0x65, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x2e, 0x45, 0x78, 0x74, 0x65,+ 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x61, 0x6c, 0x45, 0x76, 0x65, 0x6e,+ 0x74, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x66, 0x0a, 0x06,+ 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x4e, 0x2e, 0x62,+ 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x41, 0x63,+ 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x49, 0x73, 0x73, 0x75, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x65,+ 0x6e, 0x74, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x2e,+ 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x61, 0x6c,+ 0x45, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x61, 0x63,+ 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x67, 0x65, 0x5f, 0x6e, 0x61,+ 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x74, 0x61, 0x67, 0x65, 0x4e,+ 0x61, 0x6d, 0x65, 0x22, 0x2d, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x10, 0x54,+ 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10,+ 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x46, 0x45, 0x49, 0x53, 0x48, 0x55,+ 0x10, 0x01, 0x22, 0x47, 0x0a, 0x06, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x12,+ 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49,+ 0x45, 0x44, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x41,+ 0x50, 0x50, 0x52, 0x4f, 0x56, 0x45, 0x10, 0x01, 0x12, 0x11, 0x0a, 0x0d, 0x41, 0x43, 0x54, 0x49,+ 0x4f, 0x4e, 0x5f, 0x52, 0x45, 0x4a, 0x45, 0x43, 0x54, 0x10, 0x02, 0x1a, 0xac, 0x01, 0x0a, 0x0d,+ 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x61, 0x6c, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x5e, 0x0a,+ 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x46, 0x2e,+ 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x41,+ 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x49, 0x73, 0x73, 0x75, 0x65, 0x43, 0x6f, 0x6d, 0x6d,+ 0x65, 0x6e, 0x74, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64,+ 0x2e, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x61, 0x6c, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x53,+ 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x3b, 0x0a,+ 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, 0x0a, 0x12, 0x53, 0x54, 0x41, 0x54, 0x55,+ 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12,+ 0x0b, 0x0a, 0x07, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08,+ 0x41, 0x50, 0x50, 0x52, 0x4f, 0x56, 0x45, 0x44, 0x10, 0x02, 0x42, 0x07, 0x0a, 0x05, 0x65, 0x76,+ 0x65, 0x6e, 0x74, 0x42, 0x2e, 0x5a, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f,+ 0x6d, 0x2f, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x62, 0x79, 0x74, 0x65, 0x62,+ 0x61, 0x73, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x74,+ 0x6f, 0x72, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,}var (@@ -575,29 +704,33 @@ func file_store_activity_proto_rawDescGZIP() []byte {return file_store_activity_proto_rawDescData}-var file_store_activity_proto_enumTypes = make([]protoimpl.EnumInfo, 2)-var file_store_activity_proto_msgTypes = make([]protoimpl.MessageInfo, 5)+var file_store_activity_proto_enumTypes = make([]protoimpl.EnumInfo, 3)+var file_store_activity_proto_msgTypes = make([]protoimpl.MessageInfo, 6)var file_store_activity_proto_goTypes = []interface{}{(ActivityIssueCommentCreatePayload_ExternalApprovalEvent_Type)(0), // 0: bytebase.store.ActivityIssueCommentCreatePayload.ExternalApprovalEvent.Type(ActivityIssueCommentCreatePayload_ExternalApprovalEvent_Action)(0), // 1: bytebase.store.ActivityIssueCommentCreatePayload.ExternalApprovalEvent.Action- (*ActivityPayload)(nil), // 2: bytebase.store.ActivityPayload- (*ActivityIssueCreatePayload)(nil), // 3: bytebase.store.ActivityIssueCreatePayload- (*ActivityIssueCommentCreatePayload)(nil), // 4: bytebase.store.ActivityIssueCommentCreatePayload- (*ActivityIssueCommentCreatePayload_TaskRollbackBy)(nil), // 5: bytebase.store.ActivityIssueCommentCreatePayload.TaskRollbackBy- (*ActivityIssueCommentCreatePayload_ExternalApprovalEvent)(nil), // 6: bytebase.store.ActivityIssueCommentCreatePayload.ExternalApprovalEvent+ (ActivityIssueCommentCreatePayload_ApprovalEvent_Status)(0), // 2: bytebase.store.ActivityIssueCommentCreatePayload.ApprovalEvent.Status+ (*ActivityPayload)(nil), // 3: bytebase.store.ActivityPayload+ (*ActivityIssueCreatePayload)(nil), // 4: bytebase.store.ActivityIssueCreatePayload+ (*ActivityIssueCommentCreatePayload)(nil), // 5: bytebase.store.ActivityIssueCommentCreatePayload+ (*ActivityIssueCommentCreatePayload_TaskRollbackBy)(nil), // 6: bytebase.store.ActivityIssueCommentCreatePayload.TaskRollbackBy+ (*ActivityIssueCommentCreatePayload_ExternalApprovalEvent)(nil), // 7: bytebase.store.ActivityIssueCommentCreatePayload.ExternalApprovalEvent+ (*ActivityIssueCommentCreatePayload_ApprovalEvent)(nil), // 8: bytebase.store.ActivityIssueCommentCreatePayload.ApprovalEvent}var file_store_activity_proto_depIdxs = []int32{- 3, // 0: bytebase.store.ActivityPayload.issue_create_payload:type_name -> bytebase.store.ActivityIssueCreatePayload- 4, // 1: bytebase.store.ActivityPayload.issue_comment_create_payload:type_name -> bytebase.store.ActivityIssueCommentCreatePayload- 6, // 2: bytebase.store.ActivityIssueCommentCreatePayload.external_approval_event:type_name -> bytebase.store.ActivityIssueCommentCreatePayload.ExternalApprovalEvent- 5, // 3: bytebase.store.ActivityIssueCommentCreatePayload.task_rollback_by:type_name -> bytebase.store.ActivityIssueCommentCreatePayload.TaskRollbackBy- 0, // 4: bytebase.store.ActivityIssueCommentCreatePayload.ExternalApprovalEvent.type:type_name -> bytebase.store.ActivityIssueCommentCreatePayload.ExternalApprovalEvent.Type- 1, // 5: bytebase.store.ActivityIssueCommentCreatePayload.ExternalApprovalEvent.action:type_name -> bytebase.store.ActivityIssueCommentCreatePayload.ExternalApprovalEvent.Action- 6, // [6:6] is the sub-list for method output_type- 6, // [6:6] is the sub-list for method input_type- 6, // [6:6] is the sub-list for extension type_name- 6, // [6:6] is the sub-list for extension extendee- 0, // [0:6] is the sub-list for field type_name+ 4, // 0: bytebase.store.ActivityPayload.issue_create_payload:type_name -> bytebase.store.ActivityIssueCreatePayload+ 5, // 1: bytebase.store.ActivityPayload.issue_comment_create_payload:type_name -> bytebase.store.ActivityIssueCommentCreatePayload+ 7, // 2: bytebase.store.ActivityIssueCommentCreatePayload.external_approval_event:type_name -> bytebase.store.ActivityIssueCommentCreatePayload.ExternalApprovalEvent+ 6, // 3: bytebase.store.ActivityIssueCommentCreatePayload.task_rollback_by:type_name -> bytebase.store.ActivityIssueCommentCreatePayload.TaskRollbackBy+ 8, // 4: bytebase.store.ActivityIssueCommentCreatePayload.approval_event:type_name -> bytebase.store.ActivityIssueCommentCreatePayload.ApprovalEvent+ 0, // 5: bytebase.store.ActivityIssueCommentCreatePayload.ExternalApprovalEvent.type:type_name -> bytebase.store.ActivityIssueCommentCreatePayload.ExternalApprovalEvent.Type+ 1, // 6: bytebase.store.ActivityIssueCommentCreatePayload.ExternalApprovalEvent.action:type_name -> bytebase.store.ActivityIssueCommentCreatePayload.ExternalApprovalEvent.Action+ 2, // 7: bytebase.store.ActivityIssueCommentCreatePayload.ApprovalEvent.status:type_name -> bytebase.store.ActivityIssueCommentCreatePayload.ApprovalEvent.Status+ 8, // [8:8] is the sub-list for method output_type+ 8, // [8:8] is the sub-list for method input_type+ 8, // [8:8] is the sub-list for extension type_name+ 8, // [8:8] is the sub-list for extension extendee+ 0, // [0:8] is the sub-list for field type_name}func init() { file_store_activity_proto_init() }@@ -666,6 +799,18 @@ func file_store_activity_proto_init() {return nil}}+ file_store_activity_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {+ switch v := v.(*ActivityIssueCommentCreatePayload_ApprovalEvent); i {+ case 0:+ return &v.state+ case 1:+ return &v.sizeCache+ case 2:+ return &v.unknownFields+ default:+ return nil+ }+ }}file_store_activity_proto_msgTypes[0].OneofWrappers = []interface{}{(*ActivityPayload_IssueCreatePayload)(nil),@@ -674,14 +819,15 @@ func file_store_activity_proto_init() {file_store_activity_proto_msgTypes[2].OneofWrappers = []interface{}{(*ActivityIssueCommentCreatePayload_ExternalApprovalEvent_)(nil),(*ActivityIssueCommentCreatePayload_TaskRollbackBy_)(nil),+ (*ActivityIssueCommentCreatePayload_ApprovalEvent_)(nil),}type x struct{}out := protoimpl.TypeBuilder{File: protoimpl.DescBuilder{GoPackagePath: reflect.TypeOf(x{}).PkgPath(),RawDescriptor: file_store_activity_proto_rawDesc,- NumEnums: 2,- NumMessages: 5,+ NumEnums: 3,+ NumMessages: 6,NumExtensions: 0,NumServices: 0,},diff --git a/proto/store/activity.proto b/proto/store/activity.protoindex 058c02e4d3..116aa7bd8c 100644--- a/proto/store/activity.proto+++ b/proto/store/activity.proto@@ -48,10 +48,21 @@ message ActivityIssueCommentCreatePayload {string stage_name = 3;}+ message ApprovalEvent {+ enum Status {+ STATUS_UNSPECIFIED = 0;+ PENDING = 1;+ APPROVED = 2;+ }+ // The new status.+ Status status = 1;+ }+oneof event {ExternalApprovalEvent external_approval_event = 1;TaskRollbackBy task_rollback_by = 2;+ ApprovalEvent approval_event = 3;}// Used by inbox to display info without paying the join cost- string issue_name = 3;+ string issue_name = 4;}