Skip to content

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

chore: add enforce issue title to project setting (#13564)

boojack13dbe7efdd95
diff --git a/frontend/src/types/proto/store/project.ts b/frontend/src/types/proto/store/project.ts
index 9c8f0ebbe3..5aaaff6e7d 100644
--- a/frontend/src/types/proto/store/project.ts
+++ b/frontend/src/types/proto/store/project.ts
@@ -18,6 +18,8 @@ export interface Project {
allowModifyStatement: boolean;
/** Enable auto resolve issue. */
autoResolveIssue: boolean;
+ /** Enforce issue title created by user instead of generated by Bytebase. */
+ enforceIssueTitle: boolean;
}
function createBaseLabel(): Label {
@@ -110,7 +112,13 @@ export const Label = {
};
function createBaseProject(): Project {
- return { issueLabels: [], forceIssueLabels: false, allowModifyStatement: false, autoResolveIssue: false };
+ return {
+ issueLabels: [],
+ forceIssueLabels: false,
+ allowModifyStatement: false,
+ autoResolveIssue: false,
+ enforceIssueTitle: false,
+ };
}
export const Project = {
@@ -127,6 +135,9 @@ export const Project = {
if (message.autoResolveIssue === true) {
writer.uint32(40).bool(message.autoResolveIssue);
}
+ if (message.enforceIssueTitle === true) {
+ writer.uint32(48).bool(message.enforceIssueTitle);
+ }
return writer;
},
@@ -165,6 +176,13 @@ export const Project = {
message.autoResolveIssue = reader.bool();
continue;
+ case 6:
+ if (tag !== 48) {
+ break;
+ }
+
+ message.enforceIssueTitle = reader.bool();
+ continue;
}
if ((tag & 7) === 4 || tag === 0) {
break;
@@ -184,6 +202,7 @@ export const Project = {
? globalThis.Boolean(object.allowModifyStatement)
: false,
autoResolveIssue: isSet(object.autoResolveIssue) ? globalThis.Boolean(object.autoResolveIssue) : false,
+ enforceIssueTitle: isSet(object.enforceIssueTitle) ? globalThis.Boolean(object.enforceIssueTitle) : false,
};
},
@@ -201,6 +220,9 @@ export const Project = {
if (message.autoResolveIssue === true) {
obj.autoResolveIssue = message.autoResolveIssue;
}
+ if (message.enforceIssueTitle === true) {
+ obj.enforceIssueTitle = message.enforceIssueTitle;
+ }
return obj;
},
@@ -213,6 +235,7 @@ export const Project = {
message.forceIssueLabels = object.forceIssueLabels ?? false;
message.allowModifyStatement = object.allowModifyStatement ?? false;
message.autoResolveIssue = object.autoResolveIssue ?? false;
+ message.enforceIssueTitle = object.enforceIssueTitle ?? false;
return message;
},
};
diff --git a/proto/gen/grpc-doc/openapi.yaml b/proto/gen/grpc-doc/openapi.yaml
index 24960790c8..19663b8315 100644
--- a/proto/gen/grpc-doc/openapi.yaml
+++ b/proto/gen/grpc-doc/openapi.yaml
@@ -11590,6 +11590,9 @@ components:
autoResolveIssue:
type: boolean
description: Enable auto resolve issue.
+ enforceIssueTitle:
+ type: boolean
+ description: Enforce issue title created by user instead of generated by Bytebase.
QueryHistory:
type: object
properties:
diff --git a/proto/gen/grpc-doc/store/README.md b/proto/gen/grpc-doc/store/README.md
index 93b102c52e..b27804b396 100644
--- a/proto/gen/grpc-doc/store/README.md
+++ b/proto/gen/grpc-doc/store/README.md
@@ -3383,6 +3383,7 @@ SlowQueryPolicy is the policy configuration for slow query.
| force_issue_labels | [bool](#bool) | | Force issue labels to be used when creating an issue. |
| allow_modify_statement | [bool](#bool) | | Allow modifying statement after issue is created. |
| auto_resolve_issue | [bool](#bool) | | Enable auto resolve issue. |
+| enforce_issue_title | [bool](#bool) | | Enforce issue title created by user instead of generated by Bytebase. |
diff --git a/proto/gen/grpc-doc/store/index.html b/proto/gen/grpc-doc/store/index.html
index c9413b54e6..07fa0fb513 100644
--- a/proto/gen/grpc-doc/store/index.html
+++ b/proto/gen/grpc-doc/store/index.html
@@ -8672,6 +8672,13 @@ for example, the environment resource can have the sql review config tag, like &
<td><p>Enable auto resolve issue. </p></td>
</tr>
+ <tr>
+ <td>enforce_issue_title</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>Enforce issue title created by user instead of generated by Bytebase. </p></td>
+ </tr>
+
</tbody>
</table>
diff --git a/proto/generated-go/store/project.pb.go b/proto/generated-go/store/project.pb.go
index a10cea2d16..6b51833299 100644
--- a/proto/generated-go/store/project.pb.go
+++ b/proto/generated-go/store/project.pb.go
@@ -95,6 +95,8 @@ type Project struct {
AllowModifyStatement bool `protobuf:"varint,4,opt,name=allow_modify_statement,json=allowModifyStatement,proto3" json:"allow_modify_statement,omitempty"`
// Enable auto resolve issue.
AutoResolveIssue bool `protobuf:"varint,5,opt,name=auto_resolve_issue,json=autoResolveIssue,proto3" json:"auto_resolve_issue,omitempty"`
+ // Enforce issue title created by user instead of generated by Bytebase.
+ EnforceIssueTitle bool `protobuf:"varint,6,opt,name=enforce_issue_title,json=enforceIssueTitle,proto3" json:"enforce_issue_title,omitempty"`
}
func (x *Project) Reset() {
@@ -157,6 +159,13 @@ func (x *Project) GetAutoResolveIssue() bool {
return false
}
+func (x *Project) GetEnforceIssueTitle() bool {
+ if x != nil {
+ return x.EnforceIssueTitle
+ }
+ return false
+}
+
var File_store_project_proto protoreflect.FileDescriptor
var file_store_project_proto_rawDesc = []byte{
@@ -167,7 +176,7 @@ var file_store_project_proto_rawDesc = []byte{
0x61, 0x6c, 0x75, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x18, 0x02, 0x20,
0x01, 0x28, 0x09, 0x52, 0x05, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x67, 0x72,
0x6f, 0x75, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70,
- 0x22, 0xdb, 0x01, 0x0a, 0x07, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x38, 0x0a, 0x0c,
+ 0x22, 0x8b, 0x02, 0x0a, 0x07, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x38, 0x0a, 0x0c,
0x69, 0x73, 0x73, 0x75, 0x65, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x03,
0x28, 0x0b, 0x32, 0x15, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74,
0x6f, 0x72, 0x65, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x52, 0x0b, 0x69, 0x73, 0x73, 0x75, 0x65,
@@ -180,7 +189,10 @@ var file_store_project_proto_rawDesc = []byte{
0x79, 0x53, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x2c, 0x0a, 0x12, 0x61, 0x75,
0x74, 0x6f, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x5f, 0x69, 0x73, 0x73, 0x75, 0x65,
0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x61, 0x75, 0x74, 0x6f, 0x52, 0x65, 0x73, 0x6f,
- 0x6c, 0x76, 0x65, 0x49, 0x73, 0x73, 0x75, 0x65, 0x4a, 0x04, 0x08, 0x01, 0x10, 0x02, 0x42, 0x14,
+ 0x6c, 0x76, 0x65, 0x49, 0x73, 0x73, 0x75, 0x65, 0x12, 0x2e, 0x0a, 0x13, 0x65, 0x6e, 0x66, 0x6f,
+ 0x72, 0x63, 0x65, 0x5f, 0x69, 0x73, 0x73, 0x75, 0x65, 0x5f, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18,
+ 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x11, 0x65, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x49, 0x73,
+ 0x73, 0x75, 0x65, 0x54, 0x69, 0x74, 0x6c, 0x65, 0x4a, 0x04, 0x08, 0x01, 0x10, 0x02, 0x42, 0x14,
0x5a, 0x12, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2d, 0x67, 0x6f, 0x2f, 0x73,
0x74, 0x6f, 0x72, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
diff --git a/proto/store/project.proto b/proto/store/project.proto
index 72937eefe8..b5806ad68d 100644
--- a/proto/store/project.proto
+++ b/proto/store/project.proto
@@ -12,6 +12,7 @@ message Label {
message Project {
reserved 1;
+
repeated Label issue_labels = 2;
// Force issue labels to be used when creating an issue.
bool force_issue_labels = 3;
@@ -19,4 +20,6 @@ message Project {
bool allow_modify_statement = 4;
// Enable auto resolve issue.
bool auto_resolve_issue = 5;
+ // Enforce issue title created by user instead of generated by Bytebase.
+ bool enforce_issue_title = 6;
}