feat(proto): merge request note threads, ranges, edits and verdicts
- commit
- 0be2bc9659a87db8a05ab55ffcaf21eb574e5a44
- author
- brice · · 2026-10-19 05:20 UTC
- parent
- d244a03
- signature
- GPG Verified
CD88F9E564E0102646FB6077A1A07C7C7C3E349D· arch-gpg Verified for the committer email
8 files · +1274 -206
M docs/services.md +1 -1
| @@ -5,7 +5,7 @@ | |||
| 5 | 5 | | `RepoService` | `ListRepos`, `GetRepo`, `CreateRepo`, `UpdateRepo` (field mask, merge settings), `DeleteRepo` | | |
| 6 | 6 | | `GitService` | `ListRefs`, `GetTree`, `ListPaths`, `GetBlob` (streamed), `ListCommits`, `GetCommit` (structured diff), `ResolveRevision` | | |
| 7 | 7 | | `TokenService` | `CreateToken` (secret shown once), `ListTokens`, `RevokeToken` | | |
| 8 | - | | `MergeRequestService` | `CreateMergeRequest`, `ListMergeRequests`, `GetMergeRequest` (commits, diff, comments), `AddComment`, `ResolveComment`, `CloseMergeRequest`, `MergeMergeRequest`, `MarkRead` | | |
| 8 | + | | `MergeRequestService` | `CreateMergeRequest`, `ListMergeRequests`, `GetMergeRequest` (commits, diff, comments), `AddComment`, `EditComment`, `DeleteComment`, `ResolveComment`, `CloseMergeRequest`, `MergeMergeRequest`, `MarkRead` | | |
| 9 | 9 | | `SessionService` | `CreateLoginLink`, `SignOutEverywhere` (owner only) | | |
| 10 | 10 | | `EventService` | `Watch` (streamed, resumable) | | |
| 11 | 11 | | `ServerService` | `GetVersion` (version and features), `GetSigningKey`, `RotateOIDCKey` (owner only) | | |
| @@ -5,7 +5,7 @@ | |||||
| 5 | | `RepoService` | `ListRepos`, `GetRepo`, `CreateRepo`, `UpdateRepo` (field mask, merge settings), `DeleteRepo` | | 5 | | `RepoService` | `ListRepos`, `GetRepo`, `CreateRepo`, `UpdateRepo` (field mask, merge settings), `DeleteRepo` | | ||
| 6 | | `GitService` | `ListRefs`, `GetTree`, `ListPaths`, `GetBlob` (streamed), `ListCommits`, `GetCommit` (structured diff), `ResolveRevision` | | 6 | | `GitService` | `ListRefs`, `GetTree`, `ListPaths`, `GetBlob` (streamed), `ListCommits`, `GetCommit` (structured diff), `ResolveRevision` | | ||
| 7 | | `TokenService` | `CreateToken` (secret shown once), `ListTokens`, `RevokeToken` | | 7 | | `TokenService` | `CreateToken` (secret shown once), `ListTokens`, `RevokeToken` | | ||
| 8 | - | | `MergeRequestService` | `CreateMergeRequest`, `ListMergeRequests`, `GetMergeRequest` (commits, diff, comments), `AddComment`, `ResolveComment`, `CloseMergeRequest`, `MergeMergeRequest`, `MarkRead` | | 8 | + | | `MergeRequestService` | `CreateMergeRequest`, `ListMergeRequests`, `GetMergeRequest` (commits, diff, comments), `AddComment`, `EditComment`, `DeleteComment`, `ResolveComment`, `CloseMergeRequest`, `MergeMergeRequest`, `MarkRead` | |
| 9 | | `SessionService` | `CreateLoginLink`, `SignOutEverywhere` (owner only) | | 9 | | `SessionService` | `CreateLoginLink`, `SignOutEverywhere` (owner only) | | ||
| 10 | | `EventService` | `Watch` (streamed, resumable) | | 10 | | `EventService` | `Watch` (streamed, resumable) | | ||
| 11 | | `ServerService` | `GetVersion` (version and features), `GetSigningKey`, `RotateOIDCKey` (owner only) | | 11 | | `ServerService` | `GetVersion` (version and features), `GetSigningKey`, `RotateOIDCKey` (owner only) | | ||
M gen/ermite/ermiteconnect/merge_request.connect.go +110 -14
| @@ -47,6 +47,12 @@ const ( | |||
| 47 | 47 | // MergeRequestServiceAddCommentProcedure is the fully-qualified name of the MergeRequestService's | |
| 48 | 48 | // AddComment RPC. | |
| 49 | 49 | MergeRequestServiceAddCommentProcedure = "/ermite.MergeRequestService/AddComment" | |
| 50 | + | // MergeRequestServiceEditCommentProcedure is the fully-qualified name of the MergeRequestService's | |
| 51 | + | // EditComment RPC. | |
| 52 | + | MergeRequestServiceEditCommentProcedure = "/ermite.MergeRequestService/EditComment" | |
| 53 | + | // MergeRequestServiceDeleteCommentProcedure is the fully-qualified name of the | |
| 54 | + | // MergeRequestService's DeleteComment RPC. | |
| 55 | + | MergeRequestServiceDeleteCommentProcedure = "/ermite.MergeRequestService/DeleteComment" | |
| 50 | 56 | // MergeRequestServiceResolveCommentProcedure is the fully-qualified name of the | |
| 51 | 57 | // MergeRequestService's ResolveComment RPC. | |
| 52 | 58 | MergeRequestServiceResolveCommentProcedure = "/ermite.MergeRequestService/ResolveComment" | |
| @@ -79,14 +85,35 @@ type MergeRequestServiceClient interface { | |||
| 79 | 85 | // caller last marked read with the current head. Fails with not_found if | |
| 80 | 86 | // the repository or the number is unknown. | |
| 81 | 87 | GetMergeRequest(context.Context, *connect.Request[ermite.GetMergeRequestRequest]) (*connect.Response[ermite.GetMergeRequestResponse], error) | |
| 82 | - | // AddComment adds a general comment or a comment on a line of the diff. | |
| 83 | - | // Needs the mr:write scope. Fails with invalid_argument if the text breaks | |
| 84 | - | // a rule or if path, line and side do not designate a line of the current | |
| 85 | - | // diff of the merge request, and with failed_precondition if the merge | |
| 86 | - | // request is not open. | |
| 88 | + | // AddComment adds a general comment, a comment on a line or a range of | |
| 89 | + | // lines of the diff, or a reply to a root comment. Needs the mr:write | |
| 90 | + | // scope; setting a verdict also needs the mr:review scope (permission_denied | |
| 91 | + | // without it). Fails with invalid_argument if the text breaks a rule (it may | |
| 92 | + | // be empty only with a verdict), if path, line, start_line and side do not | |
| 93 | + | // designate lines of the current diff of the merge request, if reply_to is | |
| 94 | + | // not the id of a root comment that is not deleted, if a reply sets path, | |
| 95 | + | // line, start_line, side or verdict, or if a verdict is set on a reply; and | |
| 96 | + | // with failed_precondition if the merge request is not open. A comment with | |
| 97 | + | // VERDICT_APPROVE is created resolved. | |
| 87 | 98 | AddComment(context.Context, *connect.Request[ermite.AddCommentRequest]) (*connect.Response[ermite.AddCommentResponse], error) | |
| 88 | - | // ResolveComment marks a comment resolved or unresolved. Needs the mr:write | |
| 89 | - | // scope. Fails with not_found if the comment is unknown and with | |
| 99 | + | // EditComment replaces the text of a comment. Needs the mr:write scope, and | |
| 100 | + | // only the author of the comment can edit it (permission_denied | |
| 101 | + | // otherwise). Fails with invalid_argument if the text breaks a rule (it may | |
| 102 | + | // be empty only for a comment with a verdict), with not_found if the comment | |
| 103 | + | // is unknown, and with failed_precondition if the merge request is not open | |
| 104 | + | // or the comment was deleted. Sending the current text succeeds and changes | |
| 105 | + | // nothing. | |
| 106 | + | EditComment(context.Context, *connect.Request[ermite.EditCommentRequest]) (*connect.Response[ermite.EditCommentResponse], error) | |
| 107 | + | // DeleteComment deletes a comment: its text is emptied and deleted is set, | |
| 108 | + | // while its id, anchor, replies and verdict remain. Needs the mr:write | |
| 109 | + | // scope, and only the author of the comment can delete it | |
| 110 | + | // (permission_denied otherwise). Fails with not_found if the comment is | |
| 111 | + | // unknown and with failed_precondition if the merge request is not open. | |
| 112 | + | // Deleting a comment already deleted succeeds and changes nothing. | |
| 113 | + | DeleteComment(context.Context, *connect.Request[ermite.DeleteCommentRequest]) (*connect.Response[ermite.DeleteCommentResponse], error) | |
| 114 | + | // ResolveComment marks a thread resolved or unresolved. Needs the mr:write | |
| 115 | + | // scope. Resolution belongs to the root comment: on a reply it fails with | |
| 116 | + | // invalid_argument. Fails with not_found if the comment is unknown and with | |
| 90 | 117 | // failed_precondition if the merge request is not open. Setting the state | |
| 91 | 118 | // the comment already has succeeds and changes nothing. | |
| 92 | 119 | ResolveComment(context.Context, *connect.Request[ermite.ResolveCommentRequest]) (*connect.Response[ermite.ResolveCommentResponse], error) | |
| @@ -149,6 +176,18 @@ func NewMergeRequestServiceClient(httpClient connect.HTTPClient, baseURL string, | |||
| 149 | 176 | connect.WithSchema(mergeRequestServiceMethods.ByName("AddComment")), | |
| 150 | 177 | connect.WithClientOptions(opts...), | |
| 151 | 178 | ), | |
| 179 | + | editComment: connect.NewClient[ermite.EditCommentRequest, ermite.EditCommentResponse]( | |
| 180 | + | httpClient, | |
| 181 | + | baseURL+MergeRequestServiceEditCommentProcedure, | |
| 182 | + | connect.WithSchema(mergeRequestServiceMethods.ByName("EditComment")), | |
| 183 | + | connect.WithClientOptions(opts...), | |
| 184 | + | ), | |
| 185 | + | deleteComment: connect.NewClient[ermite.DeleteCommentRequest, ermite.DeleteCommentResponse]( | |
| 186 | + | httpClient, | |
| 187 | + | baseURL+MergeRequestServiceDeleteCommentProcedure, | |
| 188 | + | connect.WithSchema(mergeRequestServiceMethods.ByName("DeleteComment")), | |
| 189 | + | connect.WithClientOptions(opts...), | |
| 190 | + | ), | |
| 152 | 191 | resolveComment: connect.NewClient[ermite.ResolveCommentRequest, ermite.ResolveCommentResponse]( | |
| 153 | 192 | httpClient, | |
| 154 | 193 | baseURL+MergeRequestServiceResolveCommentProcedure, | |
| @@ -182,6 +221,8 @@ type mergeRequestServiceClient struct { | |||
| 182 | 221 | listMergeRequests *connect.Client[ermite.ListMergeRequestsRequest, ermite.ListMergeRequestsResponse] | |
| 183 | 222 | getMergeRequest *connect.Client[ermite.GetMergeRequestRequest, ermite.GetMergeRequestResponse] | |
| 184 | 223 | addComment *connect.Client[ermite.AddCommentRequest, ermite.AddCommentResponse] | |
| 224 | + | editComment *connect.Client[ermite.EditCommentRequest, ermite.EditCommentResponse] | |
| 225 | + | deleteComment *connect.Client[ermite.DeleteCommentRequest, ermite.DeleteCommentResponse] | |
| 185 | 226 | resolveComment *connect.Client[ermite.ResolveCommentRequest, ermite.ResolveCommentResponse] | |
| 186 | 227 | closeMergeRequest *connect.Client[ermite.CloseMergeRequestRequest, ermite.CloseMergeRequestResponse] | |
| 187 | 228 | mergeMergeRequest *connect.Client[ermite.MergeMergeRequestRequest, ermite.MergeMergeRequestResponse] | |
| @@ -208,6 +249,16 @@ func (c *mergeRequestServiceClient) AddComment(ctx context.Context, req *connect | |||
| 208 | 249 | return c.addComment.CallUnary(ctx, req) | |
| 209 | 250 | } | |
| 210 | 251 | ||
| 252 | + | // EditComment calls ermite.MergeRequestService.EditComment. | |
| 253 | + | func (c *mergeRequestServiceClient) EditComment(ctx context.Context, req *connect.Request[ermite.EditCommentRequest]) (*connect.Response[ermite.EditCommentResponse], error) { | |
| 254 | + | return c.editComment.CallUnary(ctx, req) | |
| 255 | + | } | |
| 256 | + | ||
| 257 | + | // DeleteComment calls ermite.MergeRequestService.DeleteComment. | |
| 258 | + | func (c *mergeRequestServiceClient) DeleteComment(ctx context.Context, req *connect.Request[ermite.DeleteCommentRequest]) (*connect.Response[ermite.DeleteCommentResponse], error) { | |
| 259 | + | return c.deleteComment.CallUnary(ctx, req) | |
| 260 | + | } | |
| 261 | + | ||
| 211 | 262 | // ResolveComment calls ermite.MergeRequestService.ResolveComment. | |
| 212 | 263 | func (c *mergeRequestServiceClient) ResolveComment(ctx context.Context, req *connect.Request[ermite.ResolveCommentRequest]) (*connect.Response[ermite.ResolveCommentResponse], error) { | |
| 213 | 264 | return c.resolveComment.CallUnary(ctx, req) | |
| @@ -246,14 +297,35 @@ type MergeRequestServiceHandler interface { | |||
| 246 | 297 | // caller last marked read with the current head. Fails with not_found if | |
| 247 | 298 | // the repository or the number is unknown. | |
| 248 | 299 | GetMergeRequest(context.Context, *connect.Request[ermite.GetMergeRequestRequest]) (*connect.Response[ermite.GetMergeRequestResponse], error) | |
| 249 | - | // AddComment adds a general comment or a comment on a line of the diff. | |
| 250 | - | // Needs the mr:write scope. Fails with invalid_argument if the text breaks | |
| 251 | - | // a rule or if path, line and side do not designate a line of the current | |
| 252 | - | // diff of the merge request, and with failed_precondition if the merge | |
| 253 | - | // request is not open. | |
| 300 | + | // AddComment adds a general comment, a comment on a line or a range of | |
| 301 | + | // lines of the diff, or a reply to a root comment. Needs the mr:write | |
| 302 | + | // scope; setting a verdict also needs the mr:review scope (permission_denied | |
| 303 | + | // without it). Fails with invalid_argument if the text breaks a rule (it may | |
| 304 | + | // be empty only with a verdict), if path, line, start_line and side do not | |
| 305 | + | // designate lines of the current diff of the merge request, if reply_to is | |
| 306 | + | // not the id of a root comment that is not deleted, if a reply sets path, | |
| 307 | + | // line, start_line, side or verdict, or if a verdict is set on a reply; and | |
| 308 | + | // with failed_precondition if the merge request is not open. A comment with | |
| 309 | + | // VERDICT_APPROVE is created resolved. | |
| 254 | 310 | AddComment(context.Context, *connect.Request[ermite.AddCommentRequest]) (*connect.Response[ermite.AddCommentResponse], error) | |
| 255 | - | // ResolveComment marks a comment resolved or unresolved. Needs the mr:write | |
| 256 | - | // scope. Fails with not_found if the comment is unknown and with | |
| 311 | + | // EditComment replaces the text of a comment. Needs the mr:write scope, and | |
| 312 | + | // only the author of the comment can edit it (permission_denied | |
| 313 | + | // otherwise). Fails with invalid_argument if the text breaks a rule (it may | |
| 314 | + | // be empty only for a comment with a verdict), with not_found if the comment | |
| 315 | + | // is unknown, and with failed_precondition if the merge request is not open | |
| 316 | + | // or the comment was deleted. Sending the current text succeeds and changes | |
| 317 | + | // nothing. | |
| 318 | + | EditComment(context.Context, *connect.Request[ermite.EditCommentRequest]) (*connect.Response[ermite.EditCommentResponse], error) | |
| 319 | + | // DeleteComment deletes a comment: its text is emptied and deleted is set, | |
| 320 | + | // while its id, anchor, replies and verdict remain. Needs the mr:write | |
| 321 | + | // scope, and only the author of the comment can delete it | |
| 322 | + | // (permission_denied otherwise). Fails with not_found if the comment is | |
| 323 | + | // unknown and with failed_precondition if the merge request is not open. | |
| 324 | + | // Deleting a comment already deleted succeeds and changes nothing. | |
| 325 | + | DeleteComment(context.Context, *connect.Request[ermite.DeleteCommentRequest]) (*connect.Response[ermite.DeleteCommentResponse], error) | |
| 326 | + | // ResolveComment marks a thread resolved or unresolved. Needs the mr:write | |
| 327 | + | // scope. Resolution belongs to the root comment: on a reply it fails with | |
| 328 | + | // invalid_argument. Fails with not_found if the comment is unknown and with | |
| 257 | 329 | // failed_precondition if the merge request is not open. Setting the state | |
| 258 | 330 | // the comment already has succeeds and changes nothing. | |
| 259 | 331 | ResolveComment(context.Context, *connect.Request[ermite.ResolveCommentRequest]) (*connect.Response[ermite.ResolveCommentResponse], error) | |
| @@ -312,6 +384,18 @@ func NewMergeRequestServiceHandler(svc MergeRequestServiceHandler, opts ...conne | |||
| 312 | 384 | connect.WithSchema(mergeRequestServiceMethods.ByName("AddComment")), | |
| 313 | 385 | connect.WithHandlerOptions(opts...), | |
| 314 | 386 | ) | |
| 387 | + | mergeRequestServiceEditCommentHandler := connect.NewUnaryHandler( | |
| 388 | + | MergeRequestServiceEditCommentProcedure, | |
| 389 | + | svc.EditComment, | |
| 390 | + | connect.WithSchema(mergeRequestServiceMethods.ByName("EditComment")), | |
| 391 | + | connect.WithHandlerOptions(opts...), | |
| 392 | + | ) | |
| 393 | + | mergeRequestServiceDeleteCommentHandler := connect.NewUnaryHandler( | |
| 394 | + | MergeRequestServiceDeleteCommentProcedure, | |
| 395 | + | svc.DeleteComment, | |
| 396 | + | connect.WithSchema(mergeRequestServiceMethods.ByName("DeleteComment")), | |
| 397 | + | connect.WithHandlerOptions(opts...), | |
| 398 | + | ) | |
| 315 | 399 | mergeRequestServiceResolveCommentHandler := connect.NewUnaryHandler( | |
| 316 | 400 | MergeRequestServiceResolveCommentProcedure, | |
| 317 | 401 | svc.ResolveComment, | |
| @@ -346,6 +430,10 @@ func NewMergeRequestServiceHandler(svc MergeRequestServiceHandler, opts ...conne | |||
| 346 | 430 | mergeRequestServiceGetMergeRequestHandler.ServeHTTP(w, r) | |
| 347 | 431 | case MergeRequestServiceAddCommentProcedure: | |
| 348 | 432 | mergeRequestServiceAddCommentHandler.ServeHTTP(w, r) | |
| 433 | + | case MergeRequestServiceEditCommentProcedure: | |
| 434 | + | mergeRequestServiceEditCommentHandler.ServeHTTP(w, r) | |
| 435 | + | case MergeRequestServiceDeleteCommentProcedure: | |
| 436 | + | mergeRequestServiceDeleteCommentHandler.ServeHTTP(w, r) | |
| 349 | 437 | case MergeRequestServiceResolveCommentProcedure: | |
| 350 | 438 | mergeRequestServiceResolveCommentHandler.ServeHTTP(w, r) | |
| 351 | 439 | case MergeRequestServiceCloseMergeRequestProcedure: | |
| @@ -379,6 +467,14 @@ func (UnimplementedMergeRequestServiceHandler) AddComment(context.Context, *conn | |||
| 379 | 467 | return nil, connect.NewError(connect.CodeUnimplemented, errors.New("ermite.MergeRequestService.AddComment is not implemented")) | |
| 380 | 468 | } | |
| 381 | 469 | ||
| 470 | + | func (UnimplementedMergeRequestServiceHandler) EditComment(context.Context, *connect.Request[ermite.EditCommentRequest]) (*connect.Response[ermite.EditCommentResponse], error) { | |
| 471 | + | return nil, connect.NewError(connect.CodeUnimplemented, errors.New("ermite.MergeRequestService.EditComment is not implemented")) | |
| 472 | + | } | |
| 473 | + | ||
| 474 | + | func (UnimplementedMergeRequestServiceHandler) DeleteComment(context.Context, *connect.Request[ermite.DeleteCommentRequest]) (*connect.Response[ermite.DeleteCommentResponse], error) { | |
| 475 | + | return nil, connect.NewError(connect.CodeUnimplemented, errors.New("ermite.MergeRequestService.DeleteComment is not implemented")) | |
| 476 | + | } | |
| 477 | + | ||
| 382 | 478 | func (UnimplementedMergeRequestServiceHandler) ResolveComment(context.Context, *connect.Request[ermite.ResolveCommentRequest]) (*connect.Response[ermite.ResolveCommentResponse], error) { | |
| 383 | 479 | return nil, connect.NewError(connect.CodeUnimplemented, errors.New("ermite.MergeRequestService.ResolveComment is not implemented")) | |
| 384 | 480 | } | |
| @@ -47,6 +47,12 @@ const ( | |||||
| 47 | // MergeRequestServiceAddCommentProcedure is the fully-qualified name of the MergeRequestService's | 47 | // MergeRequestServiceAddCommentProcedure is the fully-qualified name of the MergeRequestService's | ||
| 48 | // AddComment RPC. | 48 | // AddComment RPC. | ||
| 49 | MergeRequestServiceAddCommentProcedure = "/ermite.MergeRequestService/AddComment" | 49 | MergeRequestServiceAddCommentProcedure = "/ermite.MergeRequestService/AddComment" | ||
| 50 | + | // MergeRequestServiceEditCommentProcedure is the fully-qualified name of the MergeRequestService's | |||
| 51 | + | // EditComment RPC. | |||
| 52 | + | MergeRequestServiceEditCommentProcedure = "/ermite.MergeRequestService/EditComment" | |||
| 53 | + | // MergeRequestServiceDeleteCommentProcedure is the fully-qualified name of the | |||
| 54 | + | // MergeRequestService's DeleteComment RPC. | |||
| 55 | + | MergeRequestServiceDeleteCommentProcedure = "/ermite.MergeRequestService/DeleteComment" | |||
| 50 | // MergeRequestServiceResolveCommentProcedure is the fully-qualified name of the | 56 | // MergeRequestServiceResolveCommentProcedure is the fully-qualified name of the | ||
| 51 | // MergeRequestService's ResolveComment RPC. | 57 | // MergeRequestService's ResolveComment RPC. | ||
| 52 | MergeRequestServiceResolveCommentProcedure = "/ermite.MergeRequestService/ResolveComment" | 58 | MergeRequestServiceResolveCommentProcedure = "/ermite.MergeRequestService/ResolveComment" | ||
| @@ -79,14 +85,35 @@ type MergeRequestServiceClient interface { | |||||
| 79 | // caller last marked read with the current head. Fails with not_found if | 85 | // caller last marked read with the current head. Fails with not_found if | ||
| 80 | // the repository or the number is unknown. | 86 | // the repository or the number is unknown. | ||
| 81 | GetMergeRequest(context.Context, *connect.Request[ermite.GetMergeRequestRequest]) (*connect.Response[ermite.GetMergeRequestResponse], error) | 87 | GetMergeRequest(context.Context, *connect.Request[ermite.GetMergeRequestRequest]) (*connect.Response[ermite.GetMergeRequestResponse], error) | ||
| 82 | - | // AddComment adds a general comment or a comment on a line of the diff. | 88 | + | // AddComment adds a general comment, a comment on a line or a range of |
| 83 | - | // Needs the mr:write scope. Fails with invalid_argument if the text breaks | 89 | + | // lines of the diff, or a reply to a root comment. Needs the mr:write |
| 84 | - | // a rule or if path, line and side do not designate a line of the current | 90 | + | // scope; setting a verdict also needs the mr:review scope (permission_denied |
| 85 | - | // diff of the merge request, and with failed_precondition if the merge | 91 | + | // without it). Fails with invalid_argument if the text breaks a rule (it may |
| 86 | - | // request is not open. | 92 | + | // be empty only with a verdict), if path, line, start_line and side do not |
| 93 | + | // designate lines of the current diff of the merge request, if reply_to is | |||
| 94 | + | // not the id of a root comment that is not deleted, if a reply sets path, | |||
| 95 | + | // line, start_line, side or verdict, or if a verdict is set on a reply; and | |||
| 96 | + | // with failed_precondition if the merge request is not open. A comment with | |||
| 97 | + | // VERDICT_APPROVE is created resolved. | |||
| 87 | AddComment(context.Context, *connect.Request[ermite.AddCommentRequest]) (*connect.Response[ermite.AddCommentResponse], error) | 98 | AddComment(context.Context, *connect.Request[ermite.AddCommentRequest]) (*connect.Response[ermite.AddCommentResponse], error) | ||
| 88 | - | // ResolveComment marks a comment resolved or unresolved. Needs the mr:write | 99 | + | // EditComment replaces the text of a comment. Needs the mr:write scope, and |
| 89 | - | // scope. Fails with not_found if the comment is unknown and with | 100 | + | // only the author of the comment can edit it (permission_denied |
| 101 | + | // otherwise). Fails with invalid_argument if the text breaks a rule (it may | |||
| 102 | + | // be empty only for a comment with a verdict), with not_found if the comment | |||
| 103 | + | // is unknown, and with failed_precondition if the merge request is not open | |||
| 104 | + | // or the comment was deleted. Sending the current text succeeds and changes | |||
| 105 | + | // nothing. | |||
| 106 | + | EditComment(context.Context, *connect.Request[ermite.EditCommentRequest]) (*connect.Response[ermite.EditCommentResponse], error) | |||
| 107 | + | // DeleteComment deletes a comment: its text is emptied and deleted is set, | |||
| 108 | + | // while its id, anchor, replies and verdict remain. Needs the mr:write | |||
| 109 | + | // scope, and only the author of the comment can delete it | |||
| 110 | + | // (permission_denied otherwise). Fails with not_found if the comment is | |||
| 111 | + | // unknown and with failed_precondition if the merge request is not open. | |||
| 112 | + | // Deleting a comment already deleted succeeds and changes nothing. | |||
| 113 | + | DeleteComment(context.Context, *connect.Request[ermite.DeleteCommentRequest]) (*connect.Response[ermite.DeleteCommentResponse], error) | |||
| 114 | + | // ResolveComment marks a thread resolved or unresolved. Needs the mr:write | |||
| 115 | + | // scope. Resolution belongs to the root comment: on a reply it fails with | |||
| 116 | + | // invalid_argument. Fails with not_found if the comment is unknown and with | |||
| 90 | // failed_precondition if the merge request is not open. Setting the state | 117 | // failed_precondition if the merge request is not open. Setting the state | ||
| 91 | // the comment already has succeeds and changes nothing. | 118 | // the comment already has succeeds and changes nothing. | ||
| 92 | ResolveComment(context.Context, *connect.Request[ermite.ResolveCommentRequest]) (*connect.Response[ermite.ResolveCommentResponse], error) | 119 | ResolveComment(context.Context, *connect.Request[ermite.ResolveCommentRequest]) (*connect.Response[ermite.ResolveCommentResponse], error) | ||
| @@ -149,6 +176,18 @@ func NewMergeRequestServiceClient(httpClient connect.HTTPClient, baseURL string, | |||||
| 149 | connect.WithSchema(mergeRequestServiceMethods.ByName("AddComment")), | 176 | connect.WithSchema(mergeRequestServiceMethods.ByName("AddComment")), | ||
| 150 | connect.WithClientOptions(opts...), | 177 | connect.WithClientOptions(opts...), | ||
| 151 | ), | 178 | ), | ||
| 179 | + | editComment: connect.NewClient[ermite.EditCommentRequest, ermite.EditCommentResponse]( | |||
| 180 | + | httpClient, | |||
| 181 | + | baseURL+MergeRequestServiceEditCommentProcedure, | |||
| 182 | + | connect.WithSchema(mergeRequestServiceMethods.ByName("EditComment")), | |||
| 183 | + | connect.WithClientOptions(opts...), | |||
| 184 | + | ), | |||
| 185 | + | deleteComment: connect.NewClient[ermite.DeleteCommentRequest, ermite.DeleteCommentResponse]( | |||
| 186 | + | httpClient, | |||
| 187 | + | baseURL+MergeRequestServiceDeleteCommentProcedure, | |||
| 188 | + | connect.WithSchema(mergeRequestServiceMethods.ByName("DeleteComment")), | |||
| 189 | + | connect.WithClientOptions(opts...), | |||
| 190 | + | ), | |||
| 152 | resolveComment: connect.NewClient[ermite.ResolveCommentRequest, ermite.ResolveCommentResponse]( | 191 | resolveComment: connect.NewClient[ermite.ResolveCommentRequest, ermite.ResolveCommentResponse]( | ||
| 153 | httpClient, | 192 | httpClient, | ||
| 154 | baseURL+MergeRequestServiceResolveCommentProcedure, | 193 | baseURL+MergeRequestServiceResolveCommentProcedure, | ||
| @@ -182,6 +221,8 @@ type mergeRequestServiceClient struct { | |||||
| 182 | listMergeRequests *connect.Client[ermite.ListMergeRequestsRequest, ermite.ListMergeRequestsResponse] | 221 | listMergeRequests *connect.Client[ermite.ListMergeRequestsRequest, ermite.ListMergeRequestsResponse] | ||
| 183 | getMergeRequest *connect.Client[ermite.GetMergeRequestRequest, ermite.GetMergeRequestResponse] | 222 | getMergeRequest *connect.Client[ermite.GetMergeRequestRequest, ermite.GetMergeRequestResponse] | ||
| 184 | addComment *connect.Client[ermite.AddCommentRequest, ermite.AddCommentResponse] | 223 | addComment *connect.Client[ermite.AddCommentRequest, ermite.AddCommentResponse] | ||
| 224 | + | editComment *connect.Client[ermite.EditCommentRequest, ermite.EditCommentResponse] | |||
| 225 | + | deleteComment *connect.Client[ermite.DeleteCommentRequest, ermite.DeleteCommentResponse] | |||
| 185 | resolveComment *connect.Client[ermite.ResolveCommentRequest, ermite.ResolveCommentResponse] | 226 | resolveComment *connect.Client[ermite.ResolveCommentRequest, ermite.ResolveCommentResponse] | ||
| 186 | closeMergeRequest *connect.Client[ermite.CloseMergeRequestRequest, ermite.CloseMergeRequestResponse] | 227 | closeMergeRequest *connect.Client[ermite.CloseMergeRequestRequest, ermite.CloseMergeRequestResponse] | ||
| 187 | mergeMergeRequest *connect.Client[ermite.MergeMergeRequestRequest, ermite.MergeMergeRequestResponse] | 228 | mergeMergeRequest *connect.Client[ermite.MergeMergeRequestRequest, ermite.MergeMergeRequestResponse] | ||
| @@ -208,6 +249,16 @@ func (c *mergeRequestServiceClient) AddComment(ctx context.Context, req *connect | |||||
| 208 | return c.addComment.CallUnary(ctx, req) | 249 | return c.addComment.CallUnary(ctx, req) | ||
| 209 | } | 250 | } | ||
| 210 | 251 | ||||
| 252 | + | // EditComment calls ermite.MergeRequestService.EditComment. | |||
| 253 | + | func (c *mergeRequestServiceClient) EditComment(ctx context.Context, req *connect.Request[ermite.EditCommentRequest]) (*connect.Response[ermite.EditCommentResponse], error) { | |||
| 254 | + | return c.editComment.CallUnary(ctx, req) | |||
| 255 | + | } | |||
| 256 | + | ||||
| 257 | + | // DeleteComment calls ermite.MergeRequestService.DeleteComment. | |||
| 258 | + | func (c *mergeRequestServiceClient) DeleteComment(ctx context.Context, req *connect.Request[ermite.DeleteCommentRequest]) (*connect.Response[ermite.DeleteCommentResponse], error) { | |||
| 259 | + | return c.deleteComment.CallUnary(ctx, req) | |||
| 260 | + | } | |||
| 261 | + | ||||
| 211 | // ResolveComment calls ermite.MergeRequestService.ResolveComment. | 262 | // ResolveComment calls ermite.MergeRequestService.ResolveComment. | ||
| 212 | func (c *mergeRequestServiceClient) ResolveComment(ctx context.Context, req *connect.Request[ermite.ResolveCommentRequest]) (*connect.Response[ermite.ResolveCommentResponse], error) { | 263 | func (c *mergeRequestServiceClient) ResolveComment(ctx context.Context, req *connect.Request[ermite.ResolveCommentRequest]) (*connect.Response[ermite.ResolveCommentResponse], error) { | ||
| 213 | return c.resolveComment.CallUnary(ctx, req) | 264 | return c.resolveComment.CallUnary(ctx, req) | ||
| @@ -246,14 +297,35 @@ type MergeRequestServiceHandler interface { | |||||
| 246 | // caller last marked read with the current head. Fails with not_found if | 297 | // caller last marked read with the current head. Fails with not_found if | ||
| 247 | // the repository or the number is unknown. | 298 | // the repository or the number is unknown. | ||
| 248 | GetMergeRequest(context.Context, *connect.Request[ermite.GetMergeRequestRequest]) (*connect.Response[ermite.GetMergeRequestResponse], error) | 299 | GetMergeRequest(context.Context, *connect.Request[ermite.GetMergeRequestRequest]) (*connect.Response[ermite.GetMergeRequestResponse], error) | ||
| 249 | - | // AddComment adds a general comment or a comment on a line of the diff. | 300 | + | // AddComment adds a general comment, a comment on a line or a range of |
| 250 | - | // Needs the mr:write scope. Fails with invalid_argument if the text breaks | 301 | + | // lines of the diff, or a reply to a root comment. Needs the mr:write |
| 251 | - | // a rule or if path, line and side do not designate a line of the current | 302 | + | // scope; setting a verdict also needs the mr:review scope (permission_denied |
| 252 | - | // diff of the merge request, and with failed_precondition if the merge | 303 | + | // without it). Fails with invalid_argument if the text breaks a rule (it may |
| 253 | - | // request is not open. | 304 | + | // be empty only with a verdict), if path, line, start_line and side do not |
| 305 | + | // designate lines of the current diff of the merge request, if reply_to is | |||
| 306 | + | // not the id of a root comment that is not deleted, if a reply sets path, | |||
| 307 | + | // line, start_line, side or verdict, or if a verdict is set on a reply; and | |||
| 308 | + | // with failed_precondition if the merge request is not open. A comment with | |||
| 309 | + | // VERDICT_APPROVE is created resolved. | |||
| 254 | AddComment(context.Context, *connect.Request[ermite.AddCommentRequest]) (*connect.Response[ermite.AddCommentResponse], error) | 310 | AddComment(context.Context, *connect.Request[ermite.AddCommentRequest]) (*connect.Response[ermite.AddCommentResponse], error) | ||
| 255 | - | // ResolveComment marks a comment resolved or unresolved. Needs the mr:write | 311 | + | // EditComment replaces the text of a comment. Needs the mr:write scope, and |
| 256 | - | // scope. Fails with not_found if the comment is unknown and with | 312 | + | // only the author of the comment can edit it (permission_denied |
| 313 | + | // otherwise). Fails with invalid_argument if the text breaks a rule (it may | |||
| 314 | + | // be empty only for a comment with a verdict), with not_found if the comment | |||
| 315 | + | // is unknown, and with failed_precondition if the merge request is not open | |||
| 316 | + | // or the comment was deleted. Sending the current text succeeds and changes | |||
| 317 | + | // nothing. | |||
| 318 | + | EditComment(context.Context, *connect.Request[ermite.EditCommentRequest]) (*connect.Response[ermite.EditCommentResponse], error) | |||
| 319 | + | // DeleteComment deletes a comment: its text is emptied and deleted is set, | |||
| 320 | + | // while its id, anchor, replies and verdict remain. Needs the mr:write | |||
| 321 | + | // scope, and only the author of the comment can delete it | |||
| 322 | + | // (permission_denied otherwise). Fails with not_found if the comment is | |||
| 323 | + | // unknown and with failed_precondition if the merge request is not open. | |||
| 324 | + | // Deleting a comment already deleted succeeds and changes nothing. | |||
| 325 | + | DeleteComment(context.Context, *connect.Request[ermite.DeleteCommentRequest]) (*connect.Response[ermite.DeleteCommentResponse], error) | |||
| 326 | + | // ResolveComment marks a thread resolved or unresolved. Needs the mr:write | |||
| 327 | + | // scope. Resolution belongs to the root comment: on a reply it fails with | |||
| 328 | + | // invalid_argument. Fails with not_found if the comment is unknown and with | |||
| 257 | // failed_precondition if the merge request is not open. Setting the state | 329 | // failed_precondition if the merge request is not open. Setting the state | ||
| 258 | // the comment already has succeeds and changes nothing. | 330 | // the comment already has succeeds and changes nothing. | ||
| 259 | ResolveComment(context.Context, *connect.Request[ermite.ResolveCommentRequest]) (*connect.Response[ermite.ResolveCommentResponse], error) | 331 | ResolveComment(context.Context, *connect.Request[ermite.ResolveCommentRequest]) (*connect.Response[ermite.ResolveCommentResponse], error) | ||
| @@ -312,6 +384,18 @@ func NewMergeRequestServiceHandler(svc MergeRequestServiceHandler, opts ...conne | |||||
| 312 | connect.WithSchema(mergeRequestServiceMethods.ByName("AddComment")), | 384 | connect.WithSchema(mergeRequestServiceMethods.ByName("AddComment")), | ||
| 313 | connect.WithHandlerOptions(opts...), | 385 | connect.WithHandlerOptions(opts...), | ||
| 314 | ) | 386 | ) | ||
| 387 | + | mergeRequestServiceEditCommentHandler := connect.NewUnaryHandler( | |||
| 388 | + | MergeRequestServiceEditCommentProcedure, | |||
| 389 | + | svc.EditComment, | |||
| 390 | + | connect.WithSchema(mergeRequestServiceMethods.ByName("EditComment")), | |||
| 391 | + | connect.WithHandlerOptions(opts...), | |||
| 392 | + | ) | |||
| 393 | + | mergeRequestServiceDeleteCommentHandler := connect.NewUnaryHandler( | |||
| 394 | + | MergeRequestServiceDeleteCommentProcedure, | |||
| 395 | + | svc.DeleteComment, | |||
| 396 | + | connect.WithSchema(mergeRequestServiceMethods.ByName("DeleteComment")), | |||
| 397 | + | connect.WithHandlerOptions(opts...), | |||
| 398 | + | ) | |||
| 315 | mergeRequestServiceResolveCommentHandler := connect.NewUnaryHandler( | 399 | mergeRequestServiceResolveCommentHandler := connect.NewUnaryHandler( | ||
| 316 | MergeRequestServiceResolveCommentProcedure, | 400 | MergeRequestServiceResolveCommentProcedure, | ||
| 317 | svc.ResolveComment, | 401 | svc.ResolveComment, | ||
| @@ -346,6 +430,10 @@ func NewMergeRequestServiceHandler(svc MergeRequestServiceHandler, opts ...conne | |||||
| 346 | mergeRequestServiceGetMergeRequestHandler.ServeHTTP(w, r) | 430 | mergeRequestServiceGetMergeRequestHandler.ServeHTTP(w, r) | ||
| 347 | case MergeRequestServiceAddCommentProcedure: | 431 | case MergeRequestServiceAddCommentProcedure: | ||
| 348 | mergeRequestServiceAddCommentHandler.ServeHTTP(w, r) | 432 | mergeRequestServiceAddCommentHandler.ServeHTTP(w, r) | ||
| 433 | + | case MergeRequestServiceEditCommentProcedure: | |||
| 434 | + | mergeRequestServiceEditCommentHandler.ServeHTTP(w, r) | |||
| 435 | + | case MergeRequestServiceDeleteCommentProcedure: | |||
| 436 | + | mergeRequestServiceDeleteCommentHandler.ServeHTTP(w, r) | |||
| 349 | case MergeRequestServiceResolveCommentProcedure: | 437 | case MergeRequestServiceResolveCommentProcedure: | ||
| 350 | mergeRequestServiceResolveCommentHandler.ServeHTTP(w, r) | 438 | mergeRequestServiceResolveCommentHandler.ServeHTTP(w, r) | ||
| 351 | case MergeRequestServiceCloseMergeRequestProcedure: | 439 | case MergeRequestServiceCloseMergeRequestProcedure: | ||
| @@ -379,6 +467,14 @@ func (UnimplementedMergeRequestServiceHandler) AddComment(context.Context, *conn | |||||
| 379 | return nil, connect.NewError(connect.CodeUnimplemented, errors.New("ermite.MergeRequestService.AddComment is not implemented")) | 467 | return nil, connect.NewError(connect.CodeUnimplemented, errors.New("ermite.MergeRequestService.AddComment is not implemented")) | ||
| 380 | } | 468 | } | ||
| 381 | 469 | ||||
| 470 | + | func (UnimplementedMergeRequestServiceHandler) EditComment(context.Context, *connect.Request[ermite.EditCommentRequest]) (*connect.Response[ermite.EditCommentResponse], error) { | |||
| 471 | + | return nil, connect.NewError(connect.CodeUnimplemented, errors.New("ermite.MergeRequestService.EditComment is not implemented")) | |||
| 472 | + | } | |||
| 473 | + | ||||
| 474 | + | func (UnimplementedMergeRequestServiceHandler) DeleteComment(context.Context, *connect.Request[ermite.DeleteCommentRequest]) (*connect.Response[ermite.DeleteCommentResponse], error) { | |||
| 475 | + | return nil, connect.NewError(connect.CodeUnimplemented, errors.New("ermite.MergeRequestService.DeleteComment is not implemented")) | |||
| 476 | + | } | |||
| 477 | + | ||||
| 382 | func (UnimplementedMergeRequestServiceHandler) ResolveComment(context.Context, *connect.Request[ermite.ResolveCommentRequest]) (*connect.Response[ermite.ResolveCommentResponse], error) { | 478 | func (UnimplementedMergeRequestServiceHandler) ResolveComment(context.Context, *connect.Request[ermite.ResolveCommentRequest]) (*connect.Response[ermite.ResolveCommentResponse], error) { | ||
| 383 | return nil, connect.NewError(connect.CodeUnimplemented, errors.New("ermite.MergeRequestService.ResolveComment is not implemented")) | 479 | return nil, connect.NewError(connect.CodeUnimplemented, errors.New("ermite.MergeRequestService.ResolveComment is not implemented")) | ||
| 384 | } | 480 | } | ||
M gen/ermite/event.pb.go +314 -42 generated file: collapsed
M gen/ermite/merge_request.pb.go +661 -127
| @@ -137,6 +137,60 @@ func (DiffSide) EnumDescriptor() ([]byte, []int) { | |||
| 137 | 137 | return file_ermite_merge_request_proto_rawDescGZIP(), []int{1} | |
| 138 | 138 | } | |
| 139 | 139 | ||
| 140 | + | // Verdict is the judgement a reviewer gives with a comment. | |
| 141 | + | type Verdict int32 | |
| 142 | + | ||
| 143 | + | const ( | |
| 144 | + | // Not set. The comment carries no verdict. In AddCommentRequest it means a | |
| 145 | + | // plain comment. | |
| 146 | + | Verdict_VERDICT_UNSPECIFIED Verdict = 0 | |
| 147 | + | // The reviewer approves the merge request. The comment is created resolved. | |
| 148 | + | Verdict_VERDICT_APPROVE Verdict = 1 | |
| 149 | + | // The reviewer asks for changes. The comment starts unresolved. | |
| 150 | + | Verdict_VERDICT_CHANGES_REQUESTED Verdict = 2 | |
| 151 | + | ) | |
| 152 | + | ||
| 153 | + | // Enum value maps for Verdict. | |
| 154 | + | var ( | |
| 155 | + | Verdict_name = map[int32]string{ | |
| 156 | + | 0: "VERDICT_UNSPECIFIED", | |
| 157 | + | 1: "VERDICT_APPROVE", | |
| 158 | + | 2: "VERDICT_CHANGES_REQUESTED", | |
| 159 | + | } | |
| 160 | + | Verdict_value = map[string]int32{ | |
| 161 | + | "VERDICT_UNSPECIFIED": 0, | |
| 162 | + | "VERDICT_APPROVE": 1, | |
| 163 | + | "VERDICT_CHANGES_REQUESTED": 2, | |
| 164 | + | } | |
| 165 | + | ) | |
| 166 | + | ||
| 167 | + | func (x Verdict) Enum() *Verdict { | |
| 168 | + | p := new(Verdict) | |
| 169 | + | *p = x | |
| 170 | + | return p | |
| 171 | + | } | |
| 172 | + | ||
| 173 | + | func (x Verdict) String() string { | |
| 174 | + | return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) | |
| 175 | + | } | |
| 176 | + | ||
| 177 | + | func (Verdict) Descriptor() protoreflect.EnumDescriptor { | |
| 178 | + | return file_ermite_merge_request_proto_enumTypes[2].Descriptor() | |
| 179 | + | } | |
| 180 | + | ||
| 181 | + | func (Verdict) Type() protoreflect.EnumType { | |
| 182 | + | return &file_ermite_merge_request_proto_enumTypes[2] | |
| 183 | + | } | |
| 184 | + | ||
| 185 | + | func (x Verdict) Number() protoreflect.EnumNumber { | |
| 186 | + | return protoreflect.EnumNumber(x) | |
| 187 | + | } | |
| 188 | + | ||
| 189 | + | // Deprecated: Use Verdict.Descriptor instead. | |
| 190 | + | func (Verdict) EnumDescriptor() ([]byte, []int) { | |
| 191 | + | return file_ermite_merge_request_proto_rawDescGZIP(), []int{2} | |
| 192 | + | } | |
| 193 | + | ||
| 140 | 194 | // MergeRequest asks to merge one branch of a repository into another branch | |
| 141 | 195 | // of the same repository. It is about a branch, not about who wrote it. | |
| 142 | 196 | type MergeRequest struct { | |
| @@ -326,13 +380,32 @@ type Comment struct { | |||
| 326 | 380 | // When it differs from the current head the line may have moved; clients | |
| 327 | 381 | // may show the comment as outdated. | |
| 328 | 382 | CommitId string `protobuf:"bytes,6,opt,name=commit_id,json=commitId,proto3" json:"commit_id,omitempty"` | |
| 329 | - | // Text is the plain-text content, at most 8,000 characters. Clients show it | |
| 330 | - | // escaped, with line breaks kept. | |
| 383 | + | // Text is the Markdown source, at most 8,000 characters. Clients render it | |
| 384 | + | // as Markdown without raw HTML; "^<id>" refers to a note of the same merge | |
| 385 | + | // request. Empty when deleted is true, and possibly empty for a comment | |
| 386 | + | // that carries a verdict. | |
| 331 | 387 | Text string `protobuf:"bytes,7,opt,name=text,proto3" json:"text,omitempty"` | |
| 332 | 388 | // Resolved is true once the comment was marked resolved. | |
| 333 | 389 | Resolved bool `protobuf:"varint,8,opt,name=resolved,proto3" json:"resolved,omitempty"` | |
| 334 | 390 | // CreatedAt is when the comment was written. | |
| 335 | - | CreatedAt *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` | |
| 391 | + | CreatedAt *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` | |
| 392 | + | // ReplyTo is the id of the root comment this comment replies to. Empty for | |
| 393 | + | // a root comment. A reply has the path, line, start_line and side of its | |
| 394 | + | // root, and its commit_id is the head when the reply was written. Threads | |
| 395 | + | // have one level: a reply never has replies. | |
| 396 | + | ReplyTo string `protobuf:"bytes,10,opt,name=reply_to,json=replyTo,proto3" json:"reply_to,omitempty"` | |
| 397 | + | // StartLine is the 1-based first line of a range that ends at line, on the | |
| 398 | + | // same side. 0 for a comment on a single line or a general comment. | |
| 399 | + | StartLine int32 `protobuf:"varint,11,opt,name=start_line,json=startLine,proto3" json:"start_line,omitempty"` | |
| 400 | + | // Verdict is the judgement given with the comment. Only a root comment has | |
| 401 | + | // one; it never changes after creation. | |
| 402 | + | Verdict Verdict `protobuf:"varint,12,opt,name=verdict,proto3,enum=ermite.Verdict" json:"verdict,omitempty"` | |
| 403 | + | // EditedAt is when the text was last changed or the comment was deleted. | |
| 404 | + | // Unset if it never was. | |
| 405 | + | EditedAt *timestamppb.Timestamp `protobuf:"bytes,13,opt,name=edited_at,json=editedAt,proto3" json:"edited_at,omitempty"` | |
| 406 | + | // Deleted is true once the author deleted the comment. Its text is then | |
| 407 | + | // empty; its id, anchor, replies and verdict remain. | |
| 408 | + | Deleted bool `protobuf:"varint,14,opt,name=deleted,proto3" json:"deleted,omitempty"` | |
| 336 | 409 | unknownFields protoimpl.UnknownFields | |
| 337 | 410 | sizeCache protoimpl.SizeCache | |
| 338 | 411 | } | |
| @@ -430,6 +503,134 @@ func (x *Comment) GetCreatedAt() *timestamppb.Timestamp { | |||
| 430 | 503 | return nil | |
| 431 | 504 | } | |
| 432 | 505 | ||
| 506 | + | func (x *Comment) GetReplyTo() string { | |
| 507 | + | if x != nil { | |
| 508 | + | return x.ReplyTo | |
| 509 | + | } | |
| 510 | + | return "" | |
| 511 | + | } | |
| 512 | + | ||
| 513 | + | func (x *Comment) GetStartLine() int32 { | |
| 514 | + | if x != nil { | |
| 515 | + | return x.StartLine | |
| 516 | + | } | |
| 517 | + | return 0 | |
| 518 | + | } | |
| 519 | + | ||
| 520 | + | func (x *Comment) GetVerdict() Verdict { | |
| 521 | + | if x != nil { | |
| 522 | + | return x.Verdict | |
| 523 | + | } | |
| 524 | + | return Verdict_VERDICT_UNSPECIFIED | |
| 525 | + | } | |
| 526 | + | ||
| 527 | + | func (x *Comment) GetEditedAt() *timestamppb.Timestamp { | |
| 528 | + | if x != nil { | |
| 529 | + | return x.EditedAt | |
| 530 | + | } | |
| 531 | + | return nil | |
| 532 | + | } | |
| 533 | + | ||
| 534 | + | func (x *Comment) GetDeleted() bool { | |
| 535 | + | if x != nil { | |
| 536 | + | return x.Deleted | |
| 537 | + | } | |
| 538 | + | return false | |
| 539 | + | } | |
| 540 | + | ||
| 541 | + | // AuthorVerdict is the current verdict of one author on a merge request: the | |
| 542 | + | // one given with the author's latest comment that carries a verdict. | |
| 543 | + | type AuthorVerdict struct { | |
| 544 | + | state protoimpl.MessageState `protogen:"open.v1"` | |
| 545 | + | // Author names who gave the verdict, like Comment.author. | |
| 546 | + | Author string `protobuf:"bytes,1,opt,name=author,proto3" json:"author,omitempty"` | |
| 547 | + | // Verdict is the current verdict. Never VERDICT_UNSPECIFIED. | |
| 548 | + | Verdict Verdict `protobuf:"varint,2,opt,name=verdict,proto3,enum=ermite.Verdict" json:"verdict,omitempty"` | |
| 549 | + | // CommentId is the id of the comment that carries the verdict. | |
| 550 | + | CommentId string `protobuf:"bytes,3,opt,name=comment_id,json=commentId,proto3" json:"comment_id,omitempty"` | |
| 551 | + | // CommitId is the head of the merge request when the verdict was given. | |
| 552 | + | CommitId string `protobuf:"bytes,4,opt,name=commit_id,json=commitId,proto3" json:"commit_id,omitempty"` | |
| 553 | + | // CreatedAt is when the verdict was given. | |
| 554 | + | CreatedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` | |
| 555 | + | // Stale is true for an approval given on a commit that is not the current | |
| 556 | + | // head. A request for changes is never stale. | |
| 557 | + | Stale bool `protobuf:"varint,6,opt,name=stale,proto3" json:"stale,omitempty"` | |
| 558 | + | unknownFields protoimpl.UnknownFields | |
| 559 | + | sizeCache protoimpl.SizeCache | |
| 560 | + | } | |
| 561 | + | ||
| 562 | + | func (x *AuthorVerdict) Reset() { | |
| 563 | + | *x = AuthorVerdict{} | |
| 564 | + | mi := &file_ermite_merge_request_proto_msgTypes[2] | |
| 565 | + | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | |
| 566 | + | ms.StoreMessageInfo(mi) | |
| 567 | + | } | |
| 568 | + | ||
| 569 | + | func (x *AuthorVerdict) String() string { | |
| 570 | + | return protoimpl.X.MessageStringOf(x) | |
| 571 | + | } | |
| 572 | + | ||
| 573 | + | func (*AuthorVerdict) ProtoMessage() {} | |
| 574 | + | ||
| 575 | + | func (x *AuthorVerdict) ProtoReflect() protoreflect.Message { | |
| 576 | + | mi := &file_ermite_merge_request_proto_msgTypes[2] | |
| 577 | + | if x != nil { | |
| 578 | + | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | |
| 579 | + | if ms.LoadMessageInfo() == nil { | |
| 580 | + | ms.StoreMessageInfo(mi) | |
| 581 | + | } | |
| 582 | + | return ms | |
| 583 | + | } | |
| 584 | + | return mi.MessageOf(x) | |
| 585 | + | } | |
| 586 | + | ||
| 587 | + | // Deprecated: Use AuthorVerdict.ProtoReflect.Descriptor instead. | |
| 588 | + | func (*AuthorVerdict) Descriptor() ([]byte, []int) { | |
| 589 | + | return file_ermite_merge_request_proto_rawDescGZIP(), []int{2} | |
| 590 | + | } | |
| 591 | + | ||
| 592 | + | func (x *AuthorVerdict) GetAuthor() string { | |
| 593 | + | if x != nil { | |
| 594 | + | return x.Author | |
| 595 | + | } | |
| 596 | + | return "" | |
| 597 | + | } | |
| 598 | + | ||
| 599 | + | func (x *AuthorVerdict) GetVerdict() Verdict { | |
| 600 | + | if x != nil { | |
| 601 | + | return x.Verdict | |
| 602 | + | } | |
| 603 | + | return Verdict_VERDICT_UNSPECIFIED | |
| 604 | + | } | |
| 605 | + | ||
| 606 | + | func (x *AuthorVerdict) GetCommentId() string { | |
| 607 | + | if x != nil { | |
| 608 | + | return x.CommentId | |
| 609 | + | } | |
| 610 | + | return "" | |
| 611 | + | } | |
| 612 | + | ||
| 613 | + | func (x *AuthorVerdict) GetCommitId() string { | |
| 614 | + | if x != nil { | |
| 615 | + | return x.CommitId | |
| 616 | + | } | |
| 617 | + | return "" | |
| 618 | + | } | |
| 619 | + | ||
| 620 | + | func (x *AuthorVerdict) GetCreatedAt() *timestamppb.Timestamp { | |
| 621 | + | if x != nil { | |
| 622 | + | return x.CreatedAt | |
| 623 | + | } | |
| 624 | + | return nil | |
| 625 | + | } | |
| 626 | + | ||
| 627 | + | func (x *AuthorVerdict) GetStale() bool { | |
| 628 | + | if x != nil { | |
| 629 | + | return x.Stale | |
| 630 | + | } | |
| 631 | + | return false | |
| 632 | + | } | |
| 633 | + | ||
| 433 | 634 | // CreateMergeRequestRequest describes the merge request to open. | |
| 434 | 635 | type CreateMergeRequestRequest struct { | |
| 435 | 636 | state protoimpl.MessageState `protogen:"open.v1"` | |
| @@ -452,7 +653,7 @@ type CreateMergeRequestRequest struct { | |||
| 452 | 653 | ||
| 453 | 654 | func (x *CreateMergeRequestRequest) Reset() { | |
| 454 | 655 | *x = CreateMergeRequestRequest{} | |
| 455 | - | mi := &file_ermite_merge_request_proto_msgTypes[2] | |
| 656 | + | mi := &file_ermite_merge_request_proto_msgTypes[3] | |
| 456 | 657 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | |
| 457 | 658 | ms.StoreMessageInfo(mi) | |
| 458 | 659 | } | |
| @@ -464,7 +665,7 @@ func (x *CreateMergeRequestRequest) String() string { | |||
| 464 | 665 | func (*CreateMergeRequestRequest) ProtoMessage() {} | |
| 465 | 666 | ||
| 466 | 667 | func (x *CreateMergeRequestRequest) ProtoReflect() protoreflect.Message { | |
| 467 | - | mi := &file_ermite_merge_request_proto_msgTypes[2] | |
| 668 | + | mi := &file_ermite_merge_request_proto_msgTypes[3] | |
| 468 | 669 | if x != nil { | |
| 469 | 670 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | |
| 470 | 671 | if ms.LoadMessageInfo() == nil { | |
| @@ -477,7 +678,7 @@ func (x *CreateMergeRequestRequest) ProtoReflect() protoreflect.Message { | |||
| 477 | 678 | ||
| 478 | 679 | // Deprecated: Use CreateMergeRequestRequest.ProtoReflect.Descriptor instead. | |
| 479 | 680 | func (*CreateMergeRequestRequest) Descriptor() ([]byte, []int) { | |
| 480 | - | return file_ermite_merge_request_proto_rawDescGZIP(), []int{2} | |
| 681 | + | return file_ermite_merge_request_proto_rawDescGZIP(), []int{3} | |
| 481 | 682 | } | |
| 482 | 683 | ||
| 483 | 684 | func (x *CreateMergeRequestRequest) GetRepo() string { | |
| @@ -526,7 +727,7 @@ type CreateMergeRequestResponse struct { | |||
| 526 | 727 | ||
| 527 | 728 | func (x *CreateMergeRequestResponse) Reset() { | |
| 528 | 729 | *x = CreateMergeRequestResponse{} | |
| 529 | - | mi := &file_ermite_merge_request_proto_msgTypes[3] | |
| 730 | + | mi := &file_ermite_merge_request_proto_msgTypes[4] | |
| 530 | 731 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | |
| 531 | 732 | ms.StoreMessageInfo(mi) | |
| 532 | 733 | } | |
| @@ -538,7 +739,7 @@ func (x *CreateMergeRequestResponse) String() string { | |||
| 538 | 739 | func (*CreateMergeRequestResponse) ProtoMessage() {} | |
| 539 | 740 | ||
| 540 | 741 | func (x *CreateMergeRequestResponse) ProtoReflect() protoreflect.Message { | |
| 541 | - | mi := &file_ermite_merge_request_proto_msgTypes[3] | |
| 742 | + | mi := &file_ermite_merge_request_proto_msgTypes[4] | |
| 542 | 743 | if x != nil { | |
| 543 | 744 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | |
| 544 | 745 | if ms.LoadMessageInfo() == nil { | |
| @@ -551,7 +752,7 @@ func (x *CreateMergeRequestResponse) ProtoReflect() protoreflect.Message { | |||
| 551 | 752 | ||
| 552 | 753 | // Deprecated: Use CreateMergeRequestResponse.ProtoReflect.Descriptor instead. | |
| 553 | 754 | func (*CreateMergeRequestResponse) Descriptor() ([]byte, []int) { | |
| 554 | - | return file_ermite_merge_request_proto_rawDescGZIP(), []int{3} | |
| 755 | + | return file_ermite_merge_request_proto_rawDescGZIP(), []int{4} | |
| 555 | 756 | } | |
| 556 | 757 | ||
| 557 | 758 | func (x *CreateMergeRequestResponse) GetMergeRequest() *MergeRequest { | |
| @@ -581,7 +782,7 @@ type ListMergeRequestsRequest struct { | |||
| 581 | 782 | ||
| 582 | 783 | func (x *ListMergeRequestsRequest) Reset() { | |
| 583 | 784 | *x = ListMergeRequestsRequest{} | |
| 584 | - | mi := &file_ermite_merge_request_proto_msgTypes[4] | |
| 785 | + | mi := &file_ermite_merge_request_proto_msgTypes[5] | |
| 585 | 786 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | |
| 586 | 787 | ms.StoreMessageInfo(mi) | |
| 587 | 788 | } | |
| @@ -593,7 +794,7 @@ func (x *ListMergeRequestsRequest) String() string { | |||
| 593 | 794 | func (*ListMergeRequestsRequest) ProtoMessage() {} | |
| 594 | 795 | ||
| 595 | 796 | func (x *ListMergeRequestsRequest) ProtoReflect() protoreflect.Message { | |
| 596 | - | mi := &file_ermite_merge_request_proto_msgTypes[4] | |
| 797 | + | mi := &file_ermite_merge_request_proto_msgTypes[5] | |
| 597 | 798 | if x != nil { | |
| 598 | 799 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | |
| 599 | 800 | if ms.LoadMessageInfo() == nil { | |
| @@ -606,7 +807,7 @@ func (x *ListMergeRequestsRequest) ProtoReflect() protoreflect.Message { | |||
| 606 | 807 | ||
| 607 | 808 | // Deprecated: Use ListMergeRequestsRequest.ProtoReflect.Descriptor instead. | |
| 608 | 809 | func (*ListMergeRequestsRequest) Descriptor() ([]byte, []int) { | |
| 609 | - | return file_ermite_merge_request_proto_rawDescGZIP(), []int{4} | |
| 810 | + | return file_ermite_merge_request_proto_rawDescGZIP(), []int{5} | |
| 610 | 811 | } | |
| 611 | 812 | ||
| 612 | 813 | func (x *ListMergeRequestsRequest) GetRepo() string { | |
| @@ -651,7 +852,7 @@ type ListMergeRequestsResponse struct { | |||
| 651 | 852 | ||
| 652 | 853 | func (x *ListMergeRequestsResponse) Reset() { | |
| 653 | 854 | *x = ListMergeRequestsResponse{} | |
| 654 | - | mi := &file_ermite_merge_request_proto_msgTypes[5] | |
| 855 | + | mi := &file_ermite_merge_request_proto_msgTypes[6] | |
| 655 | 856 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | |
| 656 | 857 | ms.StoreMessageInfo(mi) | |
| 657 | 858 | } | |
| @@ -663,7 +864,7 @@ func (x *ListMergeRequestsResponse) String() string { | |||
| 663 | 864 | func (*ListMergeRequestsResponse) ProtoMessage() {} | |
| 664 | 865 | ||
| 665 | 866 | func (x *ListMergeRequestsResponse) ProtoReflect() protoreflect.Message { | |
| 666 | - | mi := &file_ermite_merge_request_proto_msgTypes[5] | |
| 867 | + | mi := &file_ermite_merge_request_proto_msgTypes[6] | |
| 667 | 868 | if x != nil { | |
| 668 | 869 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | |
| 669 | 870 | if ms.LoadMessageInfo() == nil { | |
| @@ -676,7 +877,7 @@ func (x *ListMergeRequestsResponse) ProtoReflect() protoreflect.Message { | |||
| 676 | 877 | ||
| 677 | 878 | // Deprecated: Use ListMergeRequestsResponse.ProtoReflect.Descriptor instead. | |
| 678 | 879 | func (*ListMergeRequestsResponse) Descriptor() ([]byte, []int) { | |
| 679 | - | return file_ermite_merge_request_proto_rawDescGZIP(), []int{5} | |
| 880 | + | return file_ermite_merge_request_proto_rawDescGZIP(), []int{6} | |
| 680 | 881 | } | |
| 681 | 882 | ||
| 682 | 883 | func (x *ListMergeRequestsResponse) GetMergeRequests() []*MergeRequest { | |
| @@ -713,7 +914,7 @@ type GetMergeRequestRequest struct { | |||
| 713 | 914 | ||
| 714 | 915 | func (x *GetMergeRequestRequest) Reset() { | |
| 715 | 916 | *x = GetMergeRequestRequest{} | |
| 716 | - | mi := &file_ermite_merge_request_proto_msgTypes[6] | |
| 917 | + | mi := &file_ermite_merge_request_proto_msgTypes[7] | |
| 717 | 918 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | |
| 718 | 919 | ms.StoreMessageInfo(mi) | |
| 719 | 920 | } | |
| @@ -725,7 +926,7 @@ func (x *GetMergeRequestRequest) String() string { | |||
| 725 | 926 | func (*GetMergeRequestRequest) ProtoMessage() {} | |
| 726 | 927 | ||
| 727 | 928 | func (x *GetMergeRequestRequest) ProtoReflect() protoreflect.Message { | |
| 728 | - | mi := &file_ermite_merge_request_proto_msgTypes[6] | |
| 929 | + | mi := &file_ermite_merge_request_proto_msgTypes[7] | |
| 729 | 930 | if x != nil { | |
| 730 | 931 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | |
| 731 | 932 | if ms.LoadMessageInfo() == nil { | |
| @@ -738,7 +939,7 @@ func (x *GetMergeRequestRequest) ProtoReflect() protoreflect.Message { | |||
| 738 | 939 | ||
| 739 | 940 | // Deprecated: Use GetMergeRequestRequest.ProtoReflect.Descriptor instead. | |
| 740 | 941 | func (*GetMergeRequestRequest) Descriptor() ([]byte, []int) { | |
| 741 | - | return file_ermite_merge_request_proto_rawDescGZIP(), []int{6} | |
| 942 | + | return file_ermite_merge_request_proto_rawDescGZIP(), []int{7} | |
| 742 | 943 | } | |
| 743 | 944 | ||
| 744 | 945 | func (x *GetMergeRequestRequest) GetRepo() string { | |
| @@ -794,14 +995,17 @@ type GetMergeRequestResponse struct { | |||
| 794 | 995 | // but that commit no longer exists in the repository: the diff is then the | |
| 795 | 996 | // diff against the target. A client should tell the reader to review the | |
| 796 | 997 | // whole change again. | |
| 797 | - | LastReadLost bool `protobuf:"varint,9,opt,name=last_read_lost,json=lastReadLost,proto3" json:"last_read_lost,omitempty"` | |
| 998 | + | LastReadLost bool `protobuf:"varint,9,opt,name=last_read_lost,json=lastReadLost,proto3" json:"last_read_lost,omitempty"` | |
| 999 | + | // Verdicts are the current verdicts, one per author who gave one, ordered | |
| 1000 | + | // by the comment that carries them, oldest first. | |
| 1001 | + | Verdicts []*AuthorVerdict `protobuf:"bytes,10,rep,name=verdicts,proto3" json:"verdicts,omitempty"` | |
| 798 | 1002 | unknownFields protoimpl.UnknownFields | |
| 799 | 1003 | sizeCache protoimpl.SizeCache | |
| 800 | 1004 | } | |
| 801 | 1005 | ||
| 802 | 1006 | func (x *GetMergeRequestResponse) Reset() { | |
| 803 | 1007 | *x = GetMergeRequestResponse{} | |
| 804 | - | mi := &file_ermite_merge_request_proto_msgTypes[7] | |
| 1008 | + | mi := &file_ermite_merge_request_proto_msgTypes[8] | |
| 805 | 1009 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | |
| 806 | 1010 | ms.StoreMessageInfo(mi) | |
| 807 | 1011 | } | |
| @@ -813,7 +1017,7 @@ func (x *GetMergeRequestResponse) String() string { | |||
| 813 | 1017 | func (*GetMergeRequestResponse) ProtoMessage() {} | |
| 814 | 1018 | ||
| 815 | 1019 | func (x *GetMergeRequestResponse) ProtoReflect() protoreflect.Message { | |
| 816 | - | mi := &file_ermite_merge_request_proto_msgTypes[7] | |
| 1020 | + | mi := &file_ermite_merge_request_proto_msgTypes[8] | |
| 817 | 1021 | if x != nil { | |
| 818 | 1022 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | |
| 819 | 1023 | if ms.LoadMessageInfo() == nil { | |
| @@ -826,7 +1030,7 @@ func (x *GetMergeRequestResponse) ProtoReflect() protoreflect.Message { | |||
| 826 | 1030 | ||
| 827 | 1031 | // Deprecated: Use GetMergeRequestResponse.ProtoReflect.Descriptor instead. | |
| 828 | 1032 | func (*GetMergeRequestResponse) Descriptor() ([]byte, []int) { | |
| 829 | - | return file_ermite_merge_request_proto_rawDescGZIP(), []int{7} | |
| 1033 | + | return file_ermite_merge_request_proto_rawDescGZIP(), []int{8} | |
| 830 | 1034 | } | |
| 831 | 1035 | ||
| 832 | 1036 | func (x *GetMergeRequestResponse) GetMergeRequest() *MergeRequest { | |
| @@ -892,6 +1096,13 @@ func (x *GetMergeRequestResponse) GetLastReadLost() bool { | |||
| 892 | 1096 | return false | |
| 893 | 1097 | } | |
| 894 | 1098 | ||
| 1099 | + | func (x *GetMergeRequestResponse) GetVerdicts() []*AuthorVerdict { | |
| 1100 | + | if x != nil { | |
| 1101 | + | return x.Verdicts | |
| 1102 | + | } | |
| 1103 | + | return nil | |
| 1104 | + | } | |
| 1105 | + | ||
| 895 | 1106 | // AddCommentRequest describes the comment to add. | |
| 896 | 1107 | type AddCommentRequest struct { | |
| 897 | 1108 | state protoimpl.MessageState `protogen:"open.v1"` | |
| @@ -909,15 +1120,26 @@ type AddCommentRequest struct { | |||
| 909 | 1120 | Line int32 `protobuf:"varint,4,opt,name=line,proto3" json:"line,omitempty"` | |
| 910 | 1121 | // Side is the side line counts on. Required when path is set. | |
| 911 | 1122 | Side DiffSide `protobuf:"varint,5,opt,name=side,proto3,enum=ermite.DiffSide" json:"side,omitempty"` | |
| 912 | - | // Text is the plain-text content. Required. | |
| 913 | - | Text string `protobuf:"bytes,6,opt,name=text,proto3" json:"text,omitempty"` | |
| 1123 | + | // Text is the Markdown source. Required, except when verdict is set. | |
| 1124 | + | Text string `protobuf:"bytes,6,opt,name=text,proto3" json:"text,omitempty"` | |
| 1125 | + | // ReplyTo is the id of the root comment to reply to. Empty for a new root | |
| 1126 | + | // comment. A reply takes the anchor of its root: path, line, start_line, | |
| 1127 | + | // side and verdict must then be unset. | |
| 1128 | + | ReplyTo string `protobuf:"bytes,7,opt,name=reply_to,json=replyTo,proto3" json:"reply_to,omitempty"` | |
| 1129 | + | // StartLine is the 1-based first line of a range ending at line. 0 for a | |
| 1130 | + | // single line. Needs path; it must be lower than line, and both ends must | |
| 1131 | + | // be lines of the diff on side. | |
| 1132 | + | StartLine int32 `protobuf:"varint,8,opt,name=start_line,json=startLine,proto3" json:"start_line,omitempty"` | |
| 1133 | + | // Verdict is the judgement to give. Needs the mr:review scope and a root | |
| 1134 | + | // comment. VERDICT_UNSPECIFIED for a plain comment. | |
| 1135 | + | Verdict Verdict `protobuf:"varint,9,opt,name=verdict,proto3,enum=ermite.Verdict" json:"verdict,omitempty"` | |
| 914 | 1136 | unknownFields protoimpl.UnknownFields | |
| 915 | 1137 | sizeCache protoimpl.SizeCache | |
| 916 | 1138 | } | |
| 917 | 1139 | ||
| 918 | 1140 | func (x *AddCommentRequest) Reset() { | |
| 919 | 1141 | *x = AddCommentRequest{} | |
| 920 | - | mi := &file_ermite_merge_request_proto_msgTypes[8] | |
| 1142 | + | mi := &file_ermite_merge_request_proto_msgTypes[9] | |
| 921 | 1143 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | |
| 922 | 1144 | ms.StoreMessageInfo(mi) | |
| 923 | 1145 | } | |
| @@ -929,7 +1151,7 @@ func (x *AddCommentRequest) String() string { | |||
| 929 | 1151 | func (*AddCommentRequest) ProtoMessage() {} | |
| 930 | 1152 | ||
| 931 | 1153 | func (x *AddCommentRequest) ProtoReflect() protoreflect.Message { | |
| 932 | - | mi := &file_ermite_merge_request_proto_msgTypes[8] | |
| 1154 | + | mi := &file_ermite_merge_request_proto_msgTypes[9] | |
| 933 | 1155 | if x != nil { | |
| 934 | 1156 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | |
| 935 | 1157 | if ms.LoadMessageInfo() == nil { | |
| @@ -942,7 +1164,7 @@ func (x *AddCommentRequest) ProtoReflect() protoreflect.Message { | |||
| 942 | 1164 | ||
| 943 | 1165 | // Deprecated: Use AddCommentRequest.ProtoReflect.Descriptor instead. | |
| 944 | 1166 | func (*AddCommentRequest) Descriptor() ([]byte, []int) { | |
| 945 | - | return file_ermite_merge_request_proto_rawDescGZIP(), []int{8} | |
| 1167 | + | return file_ermite_merge_request_proto_rawDescGZIP(), []int{9} | |
| 946 | 1168 | } | |
| 947 | 1169 | ||
| 948 | 1170 | func (x *AddCommentRequest) GetRepo() string { | |
| @@ -987,6 +1209,27 @@ func (x *AddCommentRequest) GetText() string { | |||
| 987 | 1209 | return "" | |
| 988 | 1210 | } | |
| 989 | 1211 | ||
| 1212 | + | func (x *AddCommentRequest) GetReplyTo() string { | |
| 1213 | + | if x != nil { | |
| 1214 | + | return x.ReplyTo | |
| 1215 | + | } | |
| 1216 | + | return "" | |
| 1217 | + | } | |
| 1218 | + | ||
| 1219 | + | func (x *AddCommentRequest) GetStartLine() int32 { | |
| 1220 | + | if x != nil { | |
| 1221 | + | return x.StartLine | |
| 1222 | + | } | |
| 1223 | + | return 0 | |
| 1224 | + | } | |
| 1225 | + | ||
| 1226 | + | func (x *AddCommentRequest) GetVerdict() Verdict { | |
| 1227 | + | if x != nil { | |
| 1228 | + | return x.Verdict | |
| 1229 | + | } | |
| 1230 | + | return Verdict_VERDICT_UNSPECIFIED | |
| 1231 | + | } | |
| 1232 | + | ||
| 990 | 1233 | // AddCommentResponse holds the new comment. | |
| 991 | 1234 | type AddCommentResponse struct { | |
| 992 | 1235 | state protoimpl.MessageState `protogen:"open.v1"` | |
| @@ -998,7 +1241,7 @@ type AddCommentResponse struct { | |||
| 998 | 1241 | ||
| 999 | 1242 | func (x *AddCommentResponse) Reset() { | |
| 1000 | 1243 | *x = AddCommentResponse{} | |
| 1001 | - | mi := &file_ermite_merge_request_proto_msgTypes[9] | |
| 1244 | + | mi := &file_ermite_merge_request_proto_msgTypes[10] | |
| 1002 | 1245 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | |
| 1003 | 1246 | ms.StoreMessageInfo(mi) | |
| 1004 | 1247 | } | |
| @@ -1010,7 +1253,7 @@ func (x *AddCommentResponse) String() string { | |||
| 1010 | 1253 | func (*AddCommentResponse) ProtoMessage() {} | |
| 1011 | 1254 | ||
| 1012 | 1255 | func (x *AddCommentResponse) ProtoReflect() protoreflect.Message { | |
| 1013 | - | mi := &file_ermite_merge_request_proto_msgTypes[9] | |
| 1256 | + | mi := &file_ermite_merge_request_proto_msgTypes[10] | |
| 1014 | 1257 | if x != nil { | |
| 1015 | 1258 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | |
| 1016 | 1259 | if ms.LoadMessageInfo() == nil { | |
| @@ -1023,7 +1266,7 @@ func (x *AddCommentResponse) ProtoReflect() protoreflect.Message { | |||
| 1023 | 1266 | ||
| 1024 | 1267 | // Deprecated: Use AddCommentResponse.ProtoReflect.Descriptor instead. | |
| 1025 | 1268 | func (*AddCommentResponse) Descriptor() ([]byte, []int) { | |
| 1026 | - | return file_ermite_merge_request_proto_rawDescGZIP(), []int{9} | |
| 1269 | + | return file_ermite_merge_request_proto_rawDescGZIP(), []int{10} | |
| 1027 | 1270 | } | |
| 1028 | 1271 | ||
| 1029 | 1272 | func (x *AddCommentResponse) GetComment() *Comment { | |
| @@ -1033,6 +1276,236 @@ func (x *AddCommentResponse) GetComment() *Comment { | |||
| 1033 | 1276 | return nil | |
| 1034 | 1277 | } | |
| 1035 | 1278 | ||
| 1279 | + | // EditCommentRequest describes the new text of a comment. | |
| 1280 | + | type EditCommentRequest struct { | |
| 1281 | + | state protoimpl.MessageState `protogen:"open.v1"` | |
| 1282 | + | // Repo is the repository name. | |
| 1283 | + | Repo string `protobuf:"bytes,1,opt,name=repo,proto3" json:"repo,omitempty"` | |
| 1284 | + | // Number is the merge request number. | |
| 1285 | + | Number int64 `protobuf:"varint,2,opt,name=number,proto3" json:"number,omitempty"` | |
| 1286 | + | // CommentId is the Comment.id to edit. | |
| 1287 | + | CommentId string `protobuf:"bytes,3,opt,name=comment_id,json=commentId,proto3" json:"comment_id,omitempty"` | |
| 1288 | + | // Text is the new Markdown source. Required, except for a comment that | |
| 1289 | + | // carries a verdict. | |
| 1290 | + | Text string `protobuf:"bytes,4,opt,name=text,proto3" json:"text,omitempty"` | |
| 1291 | + | unknownFields protoimpl.UnknownFields | |
| 1292 | + | sizeCache protoimpl.SizeCache | |
| 1293 | + | } | |
| 1294 | + | ||
| 1295 | + | func (x *EditCommentRequest) Reset() { | |
| 1296 | + | *x = EditCommentRequest{} | |
| 1297 | + | mi := &file_ermite_merge_request_proto_msgTypes[11] | |
| 1298 | + | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | |
| 1299 | + | ms.StoreMessageInfo(mi) | |
| 1300 | + | } | |
| 1301 | + | ||
| 1302 | + | func (x *EditCommentRequest) String() string { | |
| 1303 | + | return protoimpl.X.MessageStringOf(x) | |
| 1304 | + | } | |
| 1305 | + | ||
| 1306 | + | func (*EditCommentRequest) ProtoMessage() {} | |
| 1307 | + | ||
| 1308 | + | func (x *EditCommentRequest) ProtoReflect() protoreflect.Message { | |
| 1309 | + | mi := &file_ermite_merge_request_proto_msgTypes[11] | |
| 1310 | + | if x != nil { | |
| 1311 | + | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | |
| 1312 | + | if ms.LoadMessageInfo() == nil { | |
| 1313 | + | ms.StoreMessageInfo(mi) | |
| 1314 | + | } | |
| 1315 | + | return ms | |
| 1316 | + | } | |
| 1317 | + | return mi.MessageOf(x) | |
| 1318 | + | } | |
| 1319 | + | ||
| 1320 | + | // Deprecated: Use EditCommentRequest.ProtoReflect.Descriptor instead. | |
| 1321 | + | func (*EditCommentRequest) Descriptor() ([]byte, []int) { | |
| 1322 | + | return file_ermite_merge_request_proto_rawDescGZIP(), []int{11} | |
| 1323 | + | } | |
| 1324 | + | ||
| 1325 | + | func (x *EditCommentRequest) GetRepo() string { | |
| 1326 | + | if x != nil { | |
| 1327 | + | return x.Repo | |
| 1328 | + | } | |
| 1329 | + | return "" | |
| 1330 | + | } | |
| 1331 | + | ||
| 1332 | + | func (x *EditCommentRequest) GetNumber() int64 { | |
| 1333 | + | if x != nil { | |
| 1334 | + | return x.Number | |
| 1335 | + | } | |
| 1336 | + | return 0 | |
| 1337 | + | } | |
| 1338 | + | ||
| 1339 | + | func (x *EditCommentRequest) GetCommentId() string { | |
| 1340 | + | if x != nil { | |
| 1341 | + | return x.CommentId | |
| 1342 | + | } | |
| 1343 | + | return "" | |
| 1344 | + | } | |
| 1345 | + | ||
| 1346 | + | func (x *EditCommentRequest) GetText() string { | |
| 1347 | + | if x != nil { | |
| 1348 | + | return x.Text | |
| 1349 | + | } | |
| 1350 | + | return "" | |
| 1351 | + | } | |
| 1352 | + | ||
| 1353 | + | // EditCommentResponse holds the comment after the edit. | |
| 1354 | + | type EditCommentResponse struct { | |
| 1355 | + | state protoimpl.MessageState `protogen:"open.v1"` | |
| 1356 | + | // Comment is the updated comment. | |
| 1357 | + | Comment *Comment `protobuf:"bytes,1,opt,name=comment,proto3" json:"comment,omitempty"` | |
| 1358 | + | unknownFields protoimpl.UnknownFields | |
| 1359 | + | sizeCache protoimpl.SizeCache | |
| 1360 | + | } | |
| 1361 | + | ||
| 1362 | + | func (x *EditCommentResponse) Reset() { | |
| 1363 | + | *x = EditCommentResponse{} | |
| 1364 | + | mi := &file_ermite_merge_request_proto_msgTypes[12] | |
| 1365 | + | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | |
| 1366 | + | ms.StoreMessageInfo(mi) | |
| 1367 | + | } | |
| 1368 | + | ||
| 1369 | + | func (x *EditCommentResponse) String() string { | |
| 1370 | + | return protoimpl.X.MessageStringOf(x) | |
| 1371 | + | } | |
| 1372 | + | ||
| 1373 | + | func (*EditCommentResponse) ProtoMessage() {} | |
| 1374 | + | ||
| 1375 | + | func (x *EditCommentResponse) ProtoReflect() protoreflect.Message { | |
| 1376 | + | mi := &file_ermite_merge_request_proto_msgTypes[12] | |
| 1377 | + | if x != nil { | |
| 1378 | + | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | |
| 1379 | + | if ms.LoadMessageInfo() == nil { | |
| 1380 | + | ms.StoreMessageInfo(mi) | |
| 1381 | + | } | |
| 1382 | + | return ms | |
| 1383 | + | } | |
| 1384 | + | return mi.MessageOf(x) | |
| 1385 | + | } | |
| 1386 | + | ||
| 1387 | + | // Deprecated: Use EditCommentResponse.ProtoReflect.Descriptor instead. | |
| 1388 | + | func (*EditCommentResponse) Descriptor() ([]byte, []int) { | |
| 1389 | + | return file_ermite_merge_request_proto_rawDescGZIP(), []int{12} | |
| 1390 | + | } | |
| 1391 | + | ||
| 1392 | + | func (x *EditCommentResponse) GetComment() *Comment { | |
| 1393 | + | if x != nil { | |
| 1394 | + | return x.Comment | |
| 1395 | + | } | |
| 1396 | + | return nil | |
| 1397 | + | } | |
| 1398 | + | ||
| 1399 | + | // DeleteCommentRequest names the comment to delete. | |
| 1400 | + | type DeleteCommentRequest struct { | |
| 1401 | + | state protoimpl.MessageState `protogen:"open.v1"` | |
| 1402 | + | // Repo is the repository name. | |
| 1403 | + | Repo string `protobuf:"bytes,1,opt,name=repo,proto3" json:"repo,omitempty"` | |
| 1404 | + | // Number is the merge request number. | |
| 1405 | + | Number int64 `protobuf:"varint,2,opt,name=number,proto3" json:"number,omitempty"` | |
| 1406 | + | // CommentId is the Comment.id to delete. | |
| 1407 | + | CommentId string `protobuf:"bytes,3,opt,name=comment_id,json=commentId,proto3" json:"comment_id,omitempty"` | |
| 1408 | + | unknownFields protoimpl.UnknownFields | |
| 1409 | + | sizeCache protoimpl.SizeCache | |
| 1410 | + | } | |
| 1411 | + | ||
| 1412 | + | func (x *DeleteCommentRequest) Reset() { | |
| 1413 | + | *x = DeleteCommentRequest{} | |
| 1414 | + | mi := &file_ermite_merge_request_proto_msgTypes[13] | |
| 1415 | + | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | |
| 1416 | + | ms.StoreMessageInfo(mi) | |
| 1417 | + | } | |
| 1418 | + | ||
| 1419 | + | func (x *DeleteCommentRequest) String() string { | |
| 1420 | + | return protoimpl.X.MessageStringOf(x) | |
| 1421 | + | } | |
| 1422 | + | ||
| 1423 | + | func (*DeleteCommentRequest) ProtoMessage() {} | |
| 1424 | + | ||
| 1425 | + | func (x *DeleteCommentRequest) ProtoReflect() protoreflect.Message { | |
| 1426 | + | mi := &file_ermite_merge_request_proto_msgTypes[13] | |
| 1427 | + | if x != nil { | |
| 1428 | + | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | |
| 1429 | + | if ms.LoadMessageInfo() == nil { | |
| 1430 | + | ms.StoreMessageInfo(mi) | |
| 1431 | + | } | |
| 1432 | + | return ms | |
| 1433 | + | } | |
| 1434 | + | return mi.MessageOf(x) | |
| 1435 | + | } | |
| 1436 | + | ||
| 1437 | + | // Deprecated: Use DeleteCommentRequest.ProtoReflect.Descriptor instead. | |
| 1438 | + | func (*DeleteCommentRequest) Descriptor() ([]byte, []int) { | |
| 1439 | + | return file_ermite_merge_request_proto_rawDescGZIP(), []int{13} | |
| 1440 | + | } | |
| 1441 | + | ||
| 1442 | + | func (x *DeleteCommentRequest) GetRepo() string { | |
| 1443 | + | if x != nil { | |
| 1444 | + | return x.Repo | |
| 1445 | + | } | |
| 1446 | + | return "" | |
| 1447 | + | } | |
| 1448 | + | ||
| 1449 | + | func (x *DeleteCommentRequest) GetNumber() int64 { | |
| 1450 | + | if x != nil { | |
| 1451 | + | return x.Number | |
| 1452 | + | } | |
| 1453 | + | return 0 | |
| 1454 | + | } | |
| 1455 | + | ||
| 1456 | + | func (x *DeleteCommentRequest) GetCommentId() string { | |
| 1457 | + | if x != nil { | |
| 1458 | + | return x.CommentId | |
| 1459 | + | } | |
| 1460 | + | return "" | |
| 1461 | + | } | |
| 1462 | + | ||
| 1463 | + | // DeleteCommentResponse holds the comment after the deletion. | |
| 1464 | + | type DeleteCommentResponse struct { | |
| 1465 | + | state protoimpl.MessageState `protogen:"open.v1"` | |
| 1466 | + | // Comment is the deleted comment. | |
| 1467 | + | Comment *Comment `protobuf:"bytes,1,opt,name=comment,proto3" json:"comment,omitempty"` | |
| 1468 | + | unknownFields protoimpl.UnknownFields | |
| 1469 | + | sizeCache protoimpl.SizeCache | |
| 1470 | + | } | |
| 1471 | + | ||
| 1472 | + | func (x *DeleteCommentResponse) Reset() { | |
| 1473 | + | *x = DeleteCommentResponse{} | |
| 1474 | + | mi := &file_ermite_merge_request_proto_msgTypes[14] | |
| 1475 | + | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | |
| 1476 | + | ms.StoreMessageInfo(mi) | |
| 1477 | + | } | |
| 1478 | + | ||
| 1479 | + | func (x *DeleteCommentResponse) String() string { | |
| 1480 | + | return protoimpl.X.MessageStringOf(x) | |
| 1481 | + | } | |
| 1482 | + | ||
| 1483 | + | func (*DeleteCommentResponse) ProtoMessage() {} | |
| 1484 | + | ||
| 1485 | + | func (x *DeleteCommentResponse) ProtoReflect() protoreflect.Message { | |
| 1486 | + | mi := &file_ermite_merge_request_proto_msgTypes[14] | |
| 1487 | + | if x != nil { | |
| 1488 | + | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | |
| 1489 | + | if ms.LoadMessageInfo() == nil { | |
| 1490 | + | ms.StoreMessageInfo(mi) | |
| 1491 | + | } | |
| 1492 | + | return ms | |
| 1493 | + | } | |
| 1494 | + | return mi.MessageOf(x) | |
| 1495 | + | } | |
| 1496 | + | ||
| 1497 | + | // Deprecated: Use DeleteCommentResponse.ProtoReflect.Descriptor instead. | |
| 1498 | + | func (*DeleteCommentResponse) Descriptor() ([]byte, []int) { | |
| 1499 | + | return file_ermite_merge_request_proto_rawDescGZIP(), []int{14} | |
| 1500 | + | } | |
| 1501 | + | ||
| 1502 | + | func (x *DeleteCommentResponse) GetComment() *Comment { | |
| 1503 | + | if x != nil { | |
| 1504 | + | return x.Comment | |
| 1505 | + | } | |
| 1506 | + | return nil | |
| 1507 | + | } | |
| 1508 | + | ||
| 1036 | 1509 | // ResolveCommentRequest changes the resolved state of a comment. | |
| 1037 | 1510 | type ResolveCommentRequest struct { | |
| 1038 | 1511 | state protoimpl.MessageState `protogen:"open.v1"` | |
| @@ -1050,7 +1523,7 @@ type ResolveCommentRequest struct { | |||
| 1050 | 1523 | ||
| 1051 | 1524 | func (x *ResolveCommentRequest) Reset() { | |
| 1052 | 1525 | *x = ResolveCommentRequest{} | |
| 1053 | - | mi := &file_ermite_merge_request_proto_msgTypes[10] | |
| 1526 | + | mi := &file_ermite_merge_request_proto_msgTypes[15] | |
| 1054 | 1527 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | |
| 1055 | 1528 | ms.StoreMessageInfo(mi) | |
| 1056 | 1529 | } | |
| @@ -1062,7 +1535,7 @@ func (x *ResolveCommentRequest) String() string { | |||
| 1062 | 1535 | func (*ResolveCommentRequest) ProtoMessage() {} | |
| 1063 | 1536 | ||
| 1064 | 1537 | func (x *ResolveCommentRequest) ProtoReflect() protoreflect.Message { | |
| 1065 | - | mi := &file_ermite_merge_request_proto_msgTypes[10] | |
| 1538 | + | mi := &file_ermite_merge_request_proto_msgTypes[15] | |
| 1066 | 1539 | if x != nil { | |
| 1067 | 1540 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | |
| 1068 | 1541 | if ms.LoadMessageInfo() == nil { | |
| @@ -1075,7 +1548,7 @@ func (x *ResolveCommentRequest) ProtoReflect() protoreflect.Message { | |||
| 1075 | 1548 | ||
| 1076 | 1549 | // Deprecated: Use ResolveCommentRequest.ProtoReflect.Descriptor instead. | |
| 1077 | 1550 | func (*ResolveCommentRequest) Descriptor() ([]byte, []int) { | |
| 1078 | - | return file_ermite_merge_request_proto_rawDescGZIP(), []int{10} | |
| 1551 | + | return file_ermite_merge_request_proto_rawDescGZIP(), []int{15} | |
| 1079 | 1552 | } | |
| 1080 | 1553 | ||
| 1081 | 1554 | func (x *ResolveCommentRequest) GetRepo() string { | |
| @@ -1117,7 +1590,7 @@ type ResolveCommentResponse struct { | |||
| 1117 | 1590 | ||
| 1118 | 1591 | func (x *ResolveCommentResponse) Reset() { | |
| 1119 | 1592 | *x = ResolveCommentResponse{} | |
| 1120 | - | mi := &file_ermite_merge_request_proto_msgTypes[11] | |
| 1593 | + | mi := &file_ermite_merge_request_proto_msgTypes[16] | |
| 1121 | 1594 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | |
| 1122 | 1595 | ms.StoreMessageInfo(mi) | |
| 1123 | 1596 | } | |
| @@ -1129,7 +1602,7 @@ func (x *ResolveCommentResponse) String() string { | |||
| 1129 | 1602 | func (*ResolveCommentResponse) ProtoMessage() {} | |
| 1130 | 1603 | ||
| 1131 | 1604 | func (x *ResolveCommentResponse) ProtoReflect() protoreflect.Message { | |
| 1132 | - | mi := &file_ermite_merge_request_proto_msgTypes[11] | |
| 1605 | + | mi := &file_ermite_merge_request_proto_msgTypes[16] | |
| 1133 | 1606 | if x != nil { | |
| 1134 | 1607 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | |
| 1135 | 1608 | if ms.LoadMessageInfo() == nil { | |
| @@ -1142,7 +1615,7 @@ func (x *ResolveCommentResponse) ProtoReflect() protoreflect.Message { | |||
| 1142 | 1615 | ||
| 1143 | 1616 | // Deprecated: Use ResolveCommentResponse.ProtoReflect.Descriptor instead. | |
| 1144 | 1617 | func (*ResolveCommentResponse) Descriptor() ([]byte, []int) { | |
| 1145 | - | return file_ermite_merge_request_proto_rawDescGZIP(), []int{11} | |
| 1618 | + | return file_ermite_merge_request_proto_rawDescGZIP(), []int{16} | |
| 1146 | 1619 | } | |
| 1147 | 1620 | ||
| 1148 | 1621 | func (x *ResolveCommentResponse) GetComment() *Comment { | |
| @@ -1165,7 +1638,7 @@ type CloseMergeRequestRequest struct { | |||
| 1165 | 1638 | ||
| 1166 | 1639 | func (x *CloseMergeRequestRequest) Reset() { | |
| 1167 | 1640 | *x = CloseMergeRequestRequest{} | |
| 1168 | - | mi := &file_ermite_merge_request_proto_msgTypes[12] | |
| 1641 | + | mi := &file_ermite_merge_request_proto_msgTypes[17] | |
| 1169 | 1642 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | |
| 1170 | 1643 | ms.StoreMessageInfo(mi) | |
| 1171 | 1644 | } | |
| @@ -1177,7 +1650,7 @@ func (x *CloseMergeRequestRequest) String() string { | |||
| 1177 | 1650 | func (*CloseMergeRequestRequest) ProtoMessage() {} | |
| 1178 | 1651 | ||
| 1179 | 1652 | func (x *CloseMergeRequestRequest) ProtoReflect() protoreflect.Message { | |
| 1180 | - | mi := &file_ermite_merge_request_proto_msgTypes[12] | |
| 1653 | + | mi := &file_ermite_merge_request_proto_msgTypes[17] | |
| 1181 | 1654 | if x != nil { | |
| 1182 | 1655 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | |
| 1183 | 1656 | if ms.LoadMessageInfo() == nil { | |
| @@ -1190,7 +1663,7 @@ func (x *CloseMergeRequestRequest) ProtoReflect() protoreflect.Message { | |||
| 1190 | 1663 | ||
| 1191 | 1664 | // Deprecated: Use CloseMergeRequestRequest.ProtoReflect.Descriptor instead. | |
| 1192 | 1665 | func (*CloseMergeRequestRequest) Descriptor() ([]byte, []int) { | |
| 1193 | - | return file_ermite_merge_request_proto_rawDescGZIP(), []int{12} | |
| 1666 | + | return file_ermite_merge_request_proto_rawDescGZIP(), []int{17} | |
| 1194 | 1667 | } | |
| 1195 | 1668 | ||
| 1196 | 1669 | func (x *CloseMergeRequestRequest) GetRepo() string { | |
| @@ -1218,7 +1691,7 @@ type CloseMergeRequestResponse struct { | |||
| 1218 | 1691 | ||
| 1219 | 1692 | func (x *CloseMergeRequestResponse) Reset() { | |
| 1220 | 1693 | *x = CloseMergeRequestResponse{} | |
| 1221 | - | mi := &file_ermite_merge_request_proto_msgTypes[13] | |
| 1694 | + | mi := &file_ermite_merge_request_proto_msgTypes[18] | |
| 1222 | 1695 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | |
| 1223 | 1696 | ms.StoreMessageInfo(mi) | |
| 1224 | 1697 | } | |
| @@ -1230,7 +1703,7 @@ func (x *CloseMergeRequestResponse) String() string { | |||
| 1230 | 1703 | func (*CloseMergeRequestResponse) ProtoMessage() {} | |
| 1231 | 1704 | ||
| 1232 | 1705 | func (x *CloseMergeRequestResponse) ProtoReflect() protoreflect.Message { | |
| 1233 | - | mi := &file_ermite_merge_request_proto_msgTypes[13] | |
| 1706 | + | mi := &file_ermite_merge_request_proto_msgTypes[18] | |
| 1234 | 1707 | if x != nil { | |
| 1235 | 1708 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | |
| 1236 | 1709 | if ms.LoadMessageInfo() == nil { | |
| @@ -1243,7 +1716,7 @@ func (x *CloseMergeRequestResponse) ProtoReflect() protoreflect.Message { | |||
| 1243 | 1716 | ||
| 1244 | 1717 | // Deprecated: Use CloseMergeRequestResponse.ProtoReflect.Descriptor instead. | |
| 1245 | 1718 | func (*CloseMergeRequestResponse) Descriptor() ([]byte, []int) { | |
| 1246 | - | return file_ermite_merge_request_proto_rawDescGZIP(), []int{13} | |
| 1719 | + | return file_ermite_merge_request_proto_rawDescGZIP(), []int{18} | |
| 1247 | 1720 | } | |
| 1248 | 1721 | ||
| 1249 | 1722 | func (x *CloseMergeRequestResponse) GetMergeRequest() *MergeRequest { | |
| @@ -1279,7 +1752,7 @@ type MergeMergeRequestRequest struct { | |||
| 1279 | 1752 | ||
| 1280 | 1753 | func (x *MergeMergeRequestRequest) Reset() { | |
| 1281 | 1754 | *x = MergeMergeRequestRequest{} | |
| 1282 | - | mi := &file_ermite_merge_request_proto_msgTypes[14] | |
| 1755 | + | mi := &file_ermite_merge_request_proto_msgTypes[19] | |
| 1283 | 1756 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | |
| 1284 | 1757 | ms.StoreMessageInfo(mi) | |
| 1285 | 1758 | } | |
| @@ -1291,7 +1764,7 @@ func (x *MergeMergeRequestRequest) String() string { | |||
| 1291 | 1764 | func (*MergeMergeRequestRequest) ProtoMessage() {} | |
| 1292 | 1765 | ||
| 1293 | 1766 | func (x *MergeMergeRequestRequest) ProtoReflect() protoreflect.Message { | |
| 1294 | - | mi := &file_ermite_merge_request_proto_msgTypes[14] | |
| 1767 | + | mi := &file_ermite_merge_request_proto_msgTypes[19] | |
| 1295 | 1768 | if x != nil { | |
| 1296 | 1769 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | |
| 1297 | 1770 | if ms.LoadMessageInfo() == nil { | |
| @@ -1304,7 +1777,7 @@ func (x *MergeMergeRequestRequest) ProtoReflect() protoreflect.Message { | |||
| 1304 | 1777 | ||
| 1305 | 1778 | // Deprecated: Use MergeMergeRequestRequest.ProtoReflect.Descriptor instead. | |
| 1306 | 1779 | func (*MergeMergeRequestRequest) Descriptor() ([]byte, []int) { | |
| 1307 | - | return file_ermite_merge_request_proto_rawDescGZIP(), []int{14} | |
| 1780 | + | return file_ermite_merge_request_proto_rawDescGZIP(), []int{19} | |
| 1308 | 1781 | } | |
| 1309 | 1782 | ||
| 1310 | 1783 | func (x *MergeMergeRequestRequest) GetRepo() string { | |
| @@ -1359,7 +1832,7 @@ type MergeMergeRequestResponse struct { | |||
| 1359 | 1832 | ||
| 1360 | 1833 | func (x *MergeMergeRequestResponse) Reset() { | |
| 1361 | 1834 | *x = MergeMergeRequestResponse{} | |
| 1362 | - | mi := &file_ermite_merge_request_proto_msgTypes[15] | |
| 1835 | + | mi := &file_ermite_merge_request_proto_msgTypes[20] | |
| 1363 | 1836 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | |
| 1364 | 1837 | ms.StoreMessageInfo(mi) | |
| 1365 | 1838 | } | |
| @@ -1371,7 +1844,7 @@ func (x *MergeMergeRequestResponse) String() string { | |||
| 1371 | 1844 | func (*MergeMergeRequestResponse) ProtoMessage() {} | |
| 1372 | 1845 | ||
| 1373 | 1846 | func (x *MergeMergeRequestResponse) ProtoReflect() protoreflect.Message { | |
| 1374 | - | mi := &file_ermite_merge_request_proto_msgTypes[15] | |
| 1847 | + | mi := &file_ermite_merge_request_proto_msgTypes[20] | |
| 1375 | 1848 | if x != nil { | |
| 1376 | 1849 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | |
| 1377 | 1850 | if ms.LoadMessageInfo() == nil { | |
| @@ -1384,7 +1857,7 @@ func (x *MergeMergeRequestResponse) ProtoReflect() protoreflect.Message { | |||
| 1384 | 1857 | ||
| 1385 | 1858 | // Deprecated: Use MergeMergeRequestResponse.ProtoReflect.Descriptor instead. | |
| 1386 | 1859 | func (*MergeMergeRequestResponse) Descriptor() ([]byte, []int) { | |
| 1387 | - | return file_ermite_merge_request_proto_rawDescGZIP(), []int{15} | |
| 1860 | + | return file_ermite_merge_request_proto_rawDescGZIP(), []int{20} | |
| 1388 | 1861 | } | |
| 1389 | 1862 | ||
| 1390 | 1863 | func (x *MergeMergeRequestResponse) GetMergeRequest() *MergeRequest { | |
| @@ -1418,7 +1891,7 @@ type MarkReadRequest struct { | |||
| 1418 | 1891 | ||
| 1419 | 1892 | func (x *MarkReadRequest) Reset() { | |
| 1420 | 1893 | *x = MarkReadRequest{} | |
| 1421 | - | mi := &file_ermite_merge_request_proto_msgTypes[16] | |
| 1894 | + | mi := &file_ermite_merge_request_proto_msgTypes[21] | |
| 1422 | 1895 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | |
| 1423 | 1896 | ms.StoreMessageInfo(mi) | |
| 1424 | 1897 | } | |
| @@ -1430,7 +1903,7 @@ func (x *MarkReadRequest) String() string { | |||
| 1430 | 1903 | func (*MarkReadRequest) ProtoMessage() {} | |
| 1431 | 1904 | ||
| 1432 | 1905 | func (x *MarkReadRequest) ProtoReflect() protoreflect.Message { | |
| 1433 | - | mi := &file_ermite_merge_request_proto_msgTypes[16] | |
| 1906 | + | mi := &file_ermite_merge_request_proto_msgTypes[21] | |
| 1434 | 1907 | if x != nil { | |
| 1435 | 1908 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | |
| 1436 | 1909 | if ms.LoadMessageInfo() == nil { | |
| @@ -1443,7 +1916,7 @@ func (x *MarkReadRequest) ProtoReflect() protoreflect.Message { | |||
| 1443 | 1916 | ||
| 1444 | 1917 | // Deprecated: Use MarkReadRequest.ProtoReflect.Descriptor instead. | |
| 1445 | 1918 | func (*MarkReadRequest) Descriptor() ([]byte, []int) { | |
| 1446 | - | return file_ermite_merge_request_proto_rawDescGZIP(), []int{16} | |
| 1919 | + | return file_ermite_merge_request_proto_rawDescGZIP(), []int{21} | |
| 1447 | 1920 | } | |
| 1448 | 1921 | ||
| 1449 | 1922 | func (x *MarkReadRequest) GetRepo() string { | |
| @@ -1476,7 +1949,7 @@ type MarkReadResponse struct { | |||
| 1476 | 1949 | ||
| 1477 | 1950 | func (x *MarkReadResponse) Reset() { | |
| 1478 | 1951 | *x = MarkReadResponse{} | |
| 1479 | - | mi := &file_ermite_merge_request_proto_msgTypes[17] | |
| 1952 | + | mi := &file_ermite_merge_request_proto_msgTypes[22] | |
| 1480 | 1953 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | |
| 1481 | 1954 | ms.StoreMessageInfo(mi) | |
| 1482 | 1955 | } | |
| @@ -1488,7 +1961,7 @@ func (x *MarkReadResponse) String() string { | |||
| 1488 | 1961 | func (*MarkReadResponse) ProtoMessage() {} | |
| 1489 | 1962 | ||
| 1490 | 1963 | func (x *MarkReadResponse) ProtoReflect() protoreflect.Message { | |
| 1491 | - | mi := &file_ermite_merge_request_proto_msgTypes[17] | |
| 1964 | + | mi := &file_ermite_merge_request_proto_msgTypes[22] | |
| 1492 | 1965 | if x != nil { | |
| 1493 | 1966 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | |
| 1494 | 1967 | if ms.LoadMessageInfo() == nil { | |
| @@ -1501,7 +1974,7 @@ func (x *MarkReadResponse) ProtoReflect() protoreflect.Message { | |||
| 1501 | 1974 | ||
| 1502 | 1975 | // Deprecated: Use MarkReadResponse.ProtoReflect.Descriptor instead. | |
| 1503 | 1976 | func (*MarkReadResponse) Descriptor() ([]byte, []int) { | |
| 1504 | - | return file_ermite_merge_request_proto_rawDescGZIP(), []int{17} | |
| 1977 | + | return file_ermite_merge_request_proto_rawDescGZIP(), []int{22} | |
| 1505 | 1978 | } | |
| 1506 | 1979 | ||
| 1507 | 1980 | var File_ermite_merge_request_proto protoreflect.FileDescriptor | |
| @@ -1526,7 +1999,7 @@ const file_ermite_merge_request_proto_rawDesc = "" + | |||
| 1526 | 1999 | "\ahead_id\x18\v \x01(\tR\x06headId\x12(\n" + | |
| 1527 | 2000 | "\x10merged_commit_id\x18\f \x01(\tR\x0emergedCommitId\x120\n" + | |
| 1528 | 2001 | "\n" + | |
| 1529 | - | "merge_mode\x18\r \x01(\x0e2\x11.ermite.MergeModeR\tmergeMode\"\x87\x02\n" + | |
| 2002 | + | "merge_mode\x18\r \x01(\x0e2\x11.ermite.MergeModeR\tmergeMode\"\xbf\x03\n" + | |
| 1530 | 2003 | "\aComment\x12\x0e\n" + | |
| 1531 | 2004 | "\x02id\x18\x01 \x01(\tR\x02id\x12\x16\n" + | |
| 1532 | 2005 | "\x06author\x18\x02 \x01(\tR\x06author\x12\x12\n" + | |
| @@ -1537,7 +2010,23 @@ const file_ermite_merge_request_proto_rawDesc = "" + | |||
| 1537 | 2010 | "\x04text\x18\a \x01(\tR\x04text\x12\x1a\n" + | |
| 1538 | 2011 | "\bresolved\x18\b \x01(\bR\bresolved\x129\n" + | |
| 1539 | 2012 | "\n" + | |
| 1540 | - | "created_at\x18\t \x01(\v2\x1a.google.protobuf.TimestampR\tcreatedAt\"\xb1\x01\n" + | |
| 2013 | + | "created_at\x18\t \x01(\v2\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x19\n" + | |
| 2014 | + | "\breply_to\x18\n" + | |
| 2015 | + | " \x01(\tR\areplyTo\x12\x1d\n" + | |
| 2016 | + | "\n" + | |
| 2017 | + | "start_line\x18\v \x01(\x05R\tstartLine\x12)\n" + | |
| 2018 | + | "\averdict\x18\f \x01(\x0e2\x0f.ermite.VerdictR\averdict\x127\n" + | |
| 2019 | + | "\tedited_at\x18\r \x01(\v2\x1a.google.protobuf.TimestampR\beditedAt\x12\x18\n" + | |
| 2020 | + | "\adeleted\x18\x0e \x01(\bR\adeleted\"\xdf\x01\n" + | |
| 2021 | + | "\rAuthorVerdict\x12\x16\n" + | |
| 2022 | + | "\x06author\x18\x01 \x01(\tR\x06author\x12)\n" + | |
| 2023 | + | "\averdict\x18\x02 \x01(\x0e2\x0f.ermite.VerdictR\averdict\x12\x1d\n" + | |
| 2024 | + | "\n" + | |
| 2025 | + | "comment_id\x18\x03 \x01(\tR\tcommentId\x12\x1b\n" + | |
| 2026 | + | "\tcommit_id\x18\x04 \x01(\tR\bcommitId\x129\n" + | |
| 2027 | + | "\n" + | |
| 2028 | + | "created_at\x18\x05 \x01(\v2\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x14\n" + | |
| 2029 | + | "\x05stale\x18\x06 \x01(\bR\x05stale\"\xb1\x01\n" + | |
| 1541 | 2030 | "\x19CreateMergeRequestRequest\x12\x12\n" + | |
| 1542 | 2031 | "\x04repo\x18\x01 \x01(\tR\x04repo\x12\x14\n" + | |
| 1543 | 2032 | "\x05title\x18\x02 \x01(\tR\x05title\x12 \n" + | |
| @@ -1558,7 +2047,7 @@ const file_ermite_merge_request_proto_rawDesc = "" + | |||
| 1558 | 2047 | "\x16GetMergeRequestRequest\x12\x12\n" + | |
| 1559 | 2048 | "\x04repo\x18\x01 \x01(\tR\x04repo\x12\x16\n" + | |
| 1560 | 2049 | "\x06number\x18\x02 \x01(\x03R\x06number\x12&\n" + | |
| 1561 | - | "\x0fsince_last_read\x18\x03 \x01(\bR\rsinceLastRead\"\x8d\x03\n" + | |
| 2050 | + | "\x0fsince_last_read\x18\x03 \x01(\bR\rsinceLastRead\"\xc0\x03\n" + | |
| 1562 | 2051 | "\x17GetMergeRequestResponse\x129\n" + | |
| 1563 | 2052 | "\rmerge_request\x18\x01 \x01(\v2\x14.ermite.MergeRequestR\fmergeRequest\x12(\n" + | |
| 1564 | 2053 | "\acommits\x18\x02 \x03(\v2\x0e.ermite.CommitR\acommits\x12+\n" + | |
| @@ -1570,15 +2059,36 @@ const file_ermite_merge_request_proto_rawDesc = "" + | |||
| 1570 | 2059 | "\bcomments\x18\a \x03(\v2\x0f.ermite.CommentR\bcomments\x12 \n" + | |
| 1571 | 2060 | "\flast_read_id\x18\b \x01(\tR\n" + | |
| 1572 | 2061 | "lastReadId\x12$\n" + | |
| 1573 | - | "\x0elast_read_lost\x18\t \x01(\bR\flastReadLost\"\xa1\x01\n" + | |
| 2062 | + | "\x0elast_read_lost\x18\t \x01(\bR\flastReadLost\x121\n" + | |
| 2063 | + | "\bverdicts\x18\n" + | |
| 2064 | + | " \x03(\v2\x15.ermite.AuthorVerdictR\bverdicts\"\x86\x02\n" + | |
| 1574 | 2065 | "\x11AddCommentRequest\x12\x12\n" + | |
| 1575 | 2066 | "\x04repo\x18\x01 \x01(\tR\x04repo\x12\x16\n" + | |
| 1576 | 2067 | "\x06number\x18\x02 \x01(\x03R\x06number\x12\x12\n" + | |
| 1577 | 2068 | "\x04path\x18\x03 \x01(\tR\x04path\x12\x12\n" + | |
| 1578 | 2069 | "\x04line\x18\x04 \x01(\x05R\x04line\x12$\n" + | |
| 1579 | 2070 | "\x04side\x18\x05 \x01(\x0e2\x10.ermite.DiffSideR\x04side\x12\x12\n" + | |
| 1580 | - | "\x04text\x18\x06 \x01(\tR\x04text\"?\n" + | |
| 2071 | + | "\x04text\x18\x06 \x01(\tR\x04text\x12\x19\n" + | |
| 2072 | + | "\breply_to\x18\a \x01(\tR\areplyTo\x12\x1d\n" + | |
| 2073 | + | "\n" + | |
| 2074 | + | "start_line\x18\b \x01(\x05R\tstartLine\x12)\n" + | |
| 2075 | + | "\averdict\x18\t \x01(\x0e2\x0f.ermite.VerdictR\averdict\"?\n" + | |
| 1581 | 2076 | "\x12AddCommentResponse\x12)\n" + | |
| 2077 | + | "\acomment\x18\x01 \x01(\v2\x0f.ermite.CommentR\acomment\"s\n" + | |
| 2078 | + | "\x12EditCommentRequest\x12\x12\n" + | |
| 2079 | + | "\x04repo\x18\x01 \x01(\tR\x04repo\x12\x16\n" + | |
| 2080 | + | "\x06number\x18\x02 \x01(\x03R\x06number\x12\x1d\n" + | |
| 2081 | + | "\n" + | |
| 2082 | + | "comment_id\x18\x03 \x01(\tR\tcommentId\x12\x12\n" + | |
| 2083 | + | "\x04text\x18\x04 \x01(\tR\x04text\"@\n" + | |
| 2084 | + | "\x13EditCommentResponse\x12)\n" + | |
| 2085 | + | "\acomment\x18\x01 \x01(\v2\x0f.ermite.CommentR\acomment\"a\n" + | |
| 2086 | + | "\x14DeleteCommentRequest\x12\x12\n" + | |
| 2087 | + | "\x04repo\x18\x01 \x01(\tR\x04repo\x12\x16\n" + | |
| 2088 | + | "\x06number\x18\x02 \x01(\x03R\x06number\x12\x1d\n" + | |
| 2089 | + | "\n" + | |
| 2090 | + | "comment_id\x18\x03 \x01(\tR\tcommentId\"B\n" + | |
| 2091 | + | "\x15DeleteCommentResponse\x12)\n" + | |
| 1582 | 2092 | "\acomment\x18\x01 \x01(\v2\x0f.ermite.CommentR\acomment\"~\n" + | |
| 1583 | 2093 | "\x15ResolveCommentRequest\x12\x12\n" + | |
| 1584 | 2094 | "\x04repo\x18\x01 \x01(\tR\x04repo\x12\x16\n" + | |
| @@ -1615,13 +2125,19 @@ const file_ermite_merge_request_proto_rawDesc = "" + | |||
| 1615 | 2125 | "\bDiffSide\x12\x19\n" + | |
| 1616 | 2126 | "\x15DIFF_SIDE_UNSPECIFIED\x10\x00\x12\x11\n" + | |
| 1617 | 2127 | "\rDIFF_SIDE_OLD\x10\x01\x12\x11\n" + | |
| 1618 | - | "\rDIFF_SIDE_NEW\x10\x022\xa9\x05\n" + | |
| 2128 | + | "\rDIFF_SIDE_NEW\x10\x02*V\n" + | |
| 2129 | + | "\aVerdict\x12\x17\n" + | |
| 2130 | + | "\x13VERDICT_UNSPECIFIED\x10\x00\x12\x13\n" + | |
| 2131 | + | "\x0fVERDICT_APPROVE\x10\x01\x12\x1d\n" + | |
| 2132 | + | "\x19VERDICT_CHANGES_REQUESTED\x10\x022\xbf\x06\n" + | |
| 1619 | 2133 | "\x13MergeRequestService\x12[\n" + | |
| 1620 | 2134 | "\x12CreateMergeRequest\x12!.ermite.CreateMergeRequestRequest\x1a\".ermite.CreateMergeRequestResponse\x12X\n" + | |
| 1621 | 2135 | "\x11ListMergeRequests\x12 .ermite.ListMergeRequestsRequest\x1a!.ermite.ListMergeRequestsResponse\x12R\n" + | |
| 1622 | 2136 | "\x0fGetMergeRequest\x12\x1e.ermite.GetMergeRequestRequest\x1a\x1f.ermite.GetMergeRequestResponse\x12C\n" + | |
| 1623 | 2137 | "\n" + | |
| 1624 | - | "AddComment\x12\x19.ermite.AddCommentRequest\x1a\x1a.ermite.AddCommentResponse\x12O\n" + | |
| 2138 | + | "AddComment\x12\x19.ermite.AddCommentRequest\x1a\x1a.ermite.AddCommentResponse\x12F\n" + | |
| 2139 | + | "\vEditComment\x12\x1a.ermite.EditCommentRequest\x1a\x1b.ermite.EditCommentResponse\x12L\n" + | |
| 2140 | + | "\rDeleteComment\x12\x1c.ermite.DeleteCommentRequest\x1a\x1d.ermite.DeleteCommentResponse\x12O\n" + | |
| 1625 | 2141 | "\x0eResolveComment\x12\x1d.ermite.ResolveCommentRequest\x1a\x1e.ermite.ResolveCommentResponse\x12X\n" + | |
| 1626 | 2142 | "\x11CloseMergeRequest\x12 .ermite.CloseMergeRequestRequest\x1a!.ermite.CloseMergeRequestResponse\x12X\n" + | |
| 1627 | 2143 | "\x11MergeMergeRequest\x12 .ermite.MergeMergeRequestRequest\x1a!.ermite.MergeMergeRequestResponse\x12=\n" + | |
| @@ -1641,77 +2157,95 @@ func file_ermite_merge_request_proto_rawDescGZIP() []byte { | |||
| 1641 | 2157 | return file_ermite_merge_request_proto_rawDescData | |
| 1642 | 2158 | } | |
| 1643 | 2159 | ||
| 1644 | - | var file_ermite_merge_request_proto_enumTypes = make([]protoimpl.EnumInfo, 2) | |
| 1645 | - | var file_ermite_merge_request_proto_msgTypes = make([]protoimpl.MessageInfo, 18) | |
| 2160 | + | var file_ermite_merge_request_proto_enumTypes = make([]protoimpl.EnumInfo, 3) | |
| 2161 | + | var file_ermite_merge_request_proto_msgTypes = make([]protoimpl.MessageInfo, 23) | |
| 1646 | 2162 | var file_ermite_merge_request_proto_goTypes = []any{ | |
| 1647 | 2163 | (MergeRequestState)(0), // 0: ermite.MergeRequestState | |
| 1648 | 2164 | (DiffSide)(0), // 1: ermite.DiffSide | |
| 1649 | - | (*MergeRequest)(nil), // 2: ermite.MergeRequest | |
| 1650 | - | (*Comment)(nil), // 3: ermite.Comment | |
| 1651 | - | (*CreateMergeRequestRequest)(nil), // 4: ermite.CreateMergeRequestRequest | |
| 1652 | - | (*CreateMergeRequestResponse)(nil), // 5: ermite.CreateMergeRequestResponse | |
| 1653 | - | (*ListMergeRequestsRequest)(nil), // 6: ermite.ListMergeRequestsRequest | |
| 1654 | - | (*ListMergeRequestsResponse)(nil), // 7: ermite.ListMergeRequestsResponse | |
| 1655 | - | (*GetMergeRequestRequest)(nil), // 8: ermite.GetMergeRequestRequest | |
| 1656 | - | (*GetMergeRequestResponse)(nil), // 9: ermite.GetMergeRequestResponse | |
| 1657 | - | (*AddCommentRequest)(nil), // 10: ermite.AddCommentRequest | |
| 1658 | - | (*AddCommentResponse)(nil), // 11: ermite.AddCommentResponse | |
| 1659 | - | (*ResolveCommentRequest)(nil), // 12: ermite.ResolveCommentRequest | |
| 1660 | - | (*ResolveCommentResponse)(nil), // 13: ermite.ResolveCommentResponse | |
| 1661 | - | (*CloseMergeRequestRequest)(nil), // 14: ermite.CloseMergeRequestRequest | |
| 1662 | - | (*CloseMergeRequestResponse)(nil), // 15: ermite.CloseMergeRequestResponse | |
| 1663 | - | (*MergeMergeRequestRequest)(nil), // 16: ermite.MergeMergeRequestRequest | |
| 1664 | - | (*MergeMergeRequestResponse)(nil), // 17: ermite.MergeMergeRequestResponse | |
| 1665 | - | (*MarkReadRequest)(nil), // 18: ermite.MarkReadRequest | |
| 1666 | - | (*MarkReadResponse)(nil), // 19: ermite.MarkReadResponse | |
| 1667 | - | (*timestamppb.Timestamp)(nil), // 20: google.protobuf.Timestamp | |
| 1668 | - | (MergeMode)(0), // 21: ermite.MergeMode | |
| 1669 | - | (*Commit)(nil), // 22: ermite.Commit | |
| 1670 | - | (*DiffStats)(nil), // 23: ermite.DiffStats | |
| 1671 | - | (*Diff)(nil), // 24: ermite.Diff | |
| 2165 | + | (Verdict)(0), // 2: ermite.Verdict | |
| 2166 | + | (*MergeRequest)(nil), // 3: ermite.MergeRequest | |
| 2167 | + | (*Comment)(nil), // 4: ermite.Comment | |
| 2168 | + | (*AuthorVerdict)(nil), // 5: ermite.AuthorVerdict | |
| 2169 | + | (*CreateMergeRequestRequest)(nil), // 6: ermite.CreateMergeRequestRequest | |
| 2170 | + | (*CreateMergeRequestResponse)(nil), // 7: ermite.CreateMergeRequestResponse | |
| 2171 | + | (*ListMergeRequestsRequest)(nil), // 8: ermite.ListMergeRequestsRequest | |
| 2172 | + | (*ListMergeRequestsResponse)(nil), // 9: ermite.ListMergeRequestsResponse | |
| 2173 | + | (*GetMergeRequestRequest)(nil), // 10: ermite.GetMergeRequestRequest | |
| 2174 | + | (*GetMergeRequestResponse)(nil), // 11: ermite.GetMergeRequestResponse | |
| 2175 | + | (*AddCommentRequest)(nil), // 12: ermite.AddCommentRequest | |
| 2176 | + | (*AddCommentResponse)(nil), // 13: ermite.AddCommentResponse | |
| 2177 | + | (*EditCommentRequest)(nil), // 14: ermite.EditCommentRequest | |
| 2178 | + | (*EditCommentResponse)(nil), // 15: ermite.EditCommentResponse | |
| 2179 | + | (*DeleteCommentRequest)(nil), // 16: ermite.DeleteCommentRequest | |
| 2180 | + | (*DeleteCommentResponse)(nil), // 17: ermite.DeleteCommentResponse | |
| 2181 | + | (*ResolveCommentRequest)(nil), // 18: ermite.ResolveCommentRequest | |
| 2182 | + | (*ResolveCommentResponse)(nil), // 19: ermite.ResolveCommentResponse | |
| 2183 | + | (*CloseMergeRequestRequest)(nil), // 20: ermite.CloseMergeRequestRequest | |
| 2184 | + | (*CloseMergeRequestResponse)(nil), // 21: ermite.CloseMergeRequestResponse | |
| 2185 | + | (*MergeMergeRequestRequest)(nil), // 22: ermite.MergeMergeRequestRequest | |
| 2186 | + | (*MergeMergeRequestResponse)(nil), // 23: ermite.MergeMergeRequestResponse | |
| 2187 | + | (*MarkReadRequest)(nil), // 24: ermite.MarkReadRequest | |
| 2188 | + | (*MarkReadResponse)(nil), // 25: ermite.MarkReadResponse | |
| 2189 | + | (*timestamppb.Timestamp)(nil), // 26: google.protobuf.Timestamp | |
| 2190 | + | (MergeMode)(0), // 27: ermite.MergeMode | |
| 2191 | + | (*Commit)(nil), // 28: ermite.Commit | |
| 2192 | + | (*DiffStats)(nil), // 29: ermite.DiffStats | |
| 2193 | + | (*Diff)(nil), // 30: ermite.Diff | |
| 1672 | 2194 | } | |
| 1673 | 2195 | var file_ermite_merge_request_proto_depIdxs = []int32{ | |
| 1674 | 2196 | 0, // 0: ermite.MergeRequest.state:type_name -> ermite.MergeRequestState | |
| 1675 | - | 20, // 1: ermite.MergeRequest.created_at:type_name -> google.protobuf.Timestamp | |
| 1676 | - | 20, // 2: ermite.MergeRequest.updated_at:type_name -> google.protobuf.Timestamp | |
| 1677 | - | 21, // 3: ermite.MergeRequest.merge_mode:type_name -> ermite.MergeMode | |
| 2197 | + | 26, // 1: ermite.MergeRequest.created_at:type_name -> google.protobuf.Timestamp | |
| 2198 | + | 26, // 2: ermite.MergeRequest.updated_at:type_name -> google.protobuf.Timestamp | |
| 2199 | + | 27, // 3: ermite.MergeRequest.merge_mode:type_name -> ermite.MergeMode | |
| 1678 | 2200 | 1, // 4: ermite.Comment.side:type_name -> ermite.DiffSide | |
| 1679 | - | 20, // 5: ermite.Comment.created_at:type_name -> google.protobuf.Timestamp | |
| 1680 | - | 2, // 6: ermite.CreateMergeRequestResponse.merge_request:type_name -> ermite.MergeRequest | |
| 1681 | - | 0, // 7: ermite.ListMergeRequestsRequest.state:type_name -> ermite.MergeRequestState | |
| 1682 | - | 2, // 8: ermite.ListMergeRequestsResponse.merge_requests:type_name -> ermite.MergeRequest | |
| 1683 | - | 2, // 9: ermite.GetMergeRequestResponse.merge_request:type_name -> ermite.MergeRequest | |
| 1684 | - | 22, // 10: ermite.GetMergeRequestResponse.commits:type_name -> ermite.Commit | |
| 1685 | - | 23, // 11: ermite.GetMergeRequestResponse.stats:type_name -> ermite.DiffStats | |
| 1686 | - | 24, // 12: ermite.GetMergeRequestResponse.diff:type_name -> ermite.Diff | |
| 1687 | - | 3, // 13: ermite.GetMergeRequestResponse.comments:type_name -> ermite.Comment | |
| 1688 | - | 1, // 14: ermite.AddCommentRequest.side:type_name -> ermite.DiffSide | |
| 1689 | - | 3, // 15: ermite.AddCommentResponse.comment:type_name -> ermite.Comment | |
| 1690 | - | 3, // 16: ermite.ResolveCommentResponse.comment:type_name -> ermite.Comment | |
| 1691 | - | 2, // 17: ermite.CloseMergeRequestResponse.merge_request:type_name -> ermite.MergeRequest | |
| 1692 | - | 21, // 18: ermite.MergeMergeRequestRequest.mode:type_name -> ermite.MergeMode | |
| 1693 | - | 2, // 19: ermite.MergeMergeRequestResponse.merge_request:type_name -> ermite.MergeRequest | |
| 1694 | - | 4, // 20: ermite.MergeRequestService.CreateMergeRequest:input_type -> ermite.CreateMergeRequestRequest | |
| 1695 | - | 6, // 21: ermite.MergeRequestService.ListMergeRequests:input_type -> ermite.ListMergeRequestsRequest | |
| 1696 | - | 8, // 22: ermite.MergeRequestService.GetMergeRequest:input_type -> ermite.GetMergeRequestRequest | |
| 1697 | - | 10, // 23: ermite.MergeRequestService.AddComment:input_type -> ermite.AddCommentRequest | |
| 1698 | - | 12, // 24: ermite.MergeRequestService.ResolveComment:input_type -> ermite.ResolveCommentRequest | |
| 1699 | - | 14, // 25: ermite.MergeRequestService.CloseMergeRequest:input_type -> ermite.CloseMergeRequestRequest | |
| 1700 | - | 16, // 26: ermite.MergeRequestService.MergeMergeRequest:input_type -> ermite.MergeMergeRequestRequest | |
| 1701 | - | 18, // 27: ermite.MergeRequestService.MarkRead:input_type -> ermite.MarkReadRequest | |
| 1702 | - | 5, // 28: ermite.MergeRequestService.CreateMergeRequest:output_type -> ermite.CreateMergeRequestResponse | |
| 1703 | - | 7, // 29: ermite.MergeRequestService.ListMergeRequests:output_type -> ermite.ListMergeRequestsResponse | |
| 1704 | - | 9, // 30: ermite.MergeRequestService.GetMergeRequest:output_type -> ermite.GetMergeRequestResponse | |
| 1705 | - | 11, // 31: ermite.MergeRequestService.AddComment:output_type -> ermite.AddCommentResponse | |
| 1706 | - | 13, // 32: ermite.MergeRequestService.ResolveComment:output_type -> ermite.ResolveCommentResponse | |
| 1707 | - | 15, // 33: ermite.MergeRequestService.CloseMergeRequest:output_type -> ermite.CloseMergeRequestResponse | |
| 1708 | - | 17, // 34: ermite.MergeRequestService.MergeMergeRequest:output_type -> ermite.MergeMergeRequestResponse | |
| 1709 | - | 19, // 35: ermite.MergeRequestService.MarkRead:output_type -> ermite.MarkReadResponse | |
| 1710 | - | 28, // [28:36] is the sub-list for method output_type | |
| 1711 | - | 20, // [20:28] is the sub-list for method input_type | |
| 1712 | - | 20, // [20:20] is the sub-list for extension type_name | |
| 1713 | - | 20, // [20:20] is the sub-list for extension extendee | |
| 1714 | - | 0, // [0:20] is the sub-list for field type_name | |
| 2201 | + | 26, // 5: ermite.Comment.created_at:type_name -> google.protobuf.Timestamp | |
| 2202 | + | 2, // 6: ermite.Comment.verdict:type_name -> ermite.Verdict | |
| 2203 | + | 26, // 7: ermite.Comment.edited_at:type_name -> google.protobuf.Timestamp | |
| 2204 | + | 2, // 8: ermite.AuthorVerdict.verdict:type_name -> ermite.Verdict | |
| 2205 | + | 26, // 9: ermite.AuthorVerdict.created_at:type_name -> google.protobuf.Timestamp | |
| 2206 | + | 3, // 10: ermite.CreateMergeRequestResponse.merge_request:type_name -> ermite.MergeRequest | |
| 2207 | + | 0, // 11: ermite.ListMergeRequestsRequest.state:type_name -> ermite.MergeRequestState | |
| 2208 | + | 3, // 12: ermite.ListMergeRequestsResponse.merge_requests:type_name -> ermite.MergeRequest | |
| 2209 | + | 3, // 13: ermite.GetMergeRequestResponse.merge_request:type_name -> ermite.MergeRequest | |
| 2210 | + | 28, // 14: ermite.GetMergeRequestResponse.commits:type_name -> ermite.Commit | |
| 2211 | + | 29, // 15: ermite.GetMergeRequestResponse.stats:type_name -> ermite.DiffStats | |
| 2212 | + | 30, // 16: ermite.GetMergeRequestResponse.diff:type_name -> ermite.Diff | |
| 2213 | + | 4, // 17: ermite.GetMergeRequestResponse.comments:type_name -> ermite.Comment | |
| 2214 | + | 5, // 18: ermite.GetMergeRequestResponse.verdicts:type_name -> ermite.AuthorVerdict | |
| 2215 | + | 1, // 19: ermite.AddCommentRequest.side:type_name -> ermite.DiffSide | |
| 2216 | + | 2, // 20: ermite.AddCommentRequest.verdict:type_name -> ermite.Verdict | |
| 2217 | + | 4, // 21: ermite.AddCommentResponse.comment:type_name -> ermite.Comment | |
| 2218 | + | 4, // 22: ermite.EditCommentResponse.comment:type_name -> ermite.Comment | |
| 2219 | + | 4, // 23: ermite.DeleteCommentResponse.comment:type_name -> ermite.Comment | |
| 2220 | + | 4, // 24: ermite.ResolveCommentResponse.comment:type_name -> ermite.Comment | |
| 2221 | + | 3, // 25: ermite.CloseMergeRequestResponse.merge_request:type_name -> ermite.MergeRequest | |
| 2222 | + | 27, // 26: ermite.MergeMergeRequestRequest.mode:type_name -> ermite.MergeMode | |
| 2223 | + | 3, // 27: ermite.MergeMergeRequestResponse.merge_request:type_name -> ermite.MergeRequest | |
| 2224 | + | 6, // 28: ermite.MergeRequestService.CreateMergeRequest:input_type -> ermite.CreateMergeRequestRequest | |
| 2225 | + | 8, // 29: ermite.MergeRequestService.ListMergeRequests:input_type -> ermite.ListMergeRequestsRequest | |
| 2226 | + | 10, // 30: ermite.MergeRequestService.GetMergeRequest:input_type -> ermite.GetMergeRequestRequest | |
| 2227 | + | 12, // 31: ermite.MergeRequestService.AddComment:input_type -> ermite.AddCommentRequest | |
| 2228 | + | 14, // 32: ermite.MergeRequestService.EditComment:input_type -> ermite.EditCommentRequest | |
| 2229 | + | 16, // 33: ermite.MergeRequestService.DeleteComment:input_type -> ermite.DeleteCommentRequest | |
| 2230 | + | 18, // 34: ermite.MergeRequestService.ResolveComment:input_type -> ermite.ResolveCommentRequest | |
| 2231 | + | 20, // 35: ermite.MergeRequestService.CloseMergeRequest:input_type -> ermite.CloseMergeRequestRequest | |
| 2232 | + | 22, // 36: ermite.MergeRequestService.MergeMergeRequest:input_type -> ermite.MergeMergeRequestRequest | |
| 2233 | + | 24, // 37: ermite.MergeRequestService.MarkRead:input_type -> ermite.MarkReadRequest | |
| 2234 | + | 7, // 38: ermite.MergeRequestService.CreateMergeRequest:output_type -> ermite.CreateMergeRequestResponse | |
| 2235 | + | 9, // 39: ermite.MergeRequestService.ListMergeRequests:output_type -> ermite.ListMergeRequestsResponse | |
| 2236 | + | 11, // 40: ermite.MergeRequestService.GetMergeRequest:output_type -> ermite.GetMergeRequestResponse | |
| 2237 | + | 13, // 41: ermite.MergeRequestService.AddComment:output_type -> ermite.AddCommentResponse | |
| 2238 | + | 15, // 42: ermite.MergeRequestService.EditComment:output_type -> ermite.EditCommentResponse | |
| 2239 | + | 17, // 43: ermite.MergeRequestService.DeleteComment:output_type -> ermite.DeleteCommentResponse | |
| 2240 | + | 19, // 44: ermite.MergeRequestService.ResolveComment:output_type -> ermite.ResolveCommentResponse | |
| 2241 | + | 21, // 45: ermite.MergeRequestService.CloseMergeRequest:output_type -> ermite.CloseMergeRequestResponse | |
| 2242 | + | 23, // 46: ermite.MergeRequestService.MergeMergeRequest:output_type -> ermite.MergeMergeRequestResponse | |
| 2243 | + | 25, // 47: ermite.MergeRequestService.MarkRead:output_type -> ermite.MarkReadResponse | |
| 2244 | + | 38, // [38:48] is the sub-list for method output_type | |
| 2245 | + | 28, // [28:38] is the sub-list for method input_type | |
| 2246 | + | 28, // [28:28] is the sub-list for extension type_name | |
| 2247 | + | 28, // [28:28] is the sub-list for extension extendee | |
| 2248 | + | 0, // [0:28] is the sub-list for field type_name | |
| 1715 | 2249 | } | |
| 1716 | 2250 | ||
| 1717 | 2251 | func init() { file_ermite_merge_request_proto_init() } | |
| @@ -1726,8 +2260,8 @@ func file_ermite_merge_request_proto_init() { | |||
| 1726 | 2260 | File: protoimpl.DescBuilder{ | |
| 1727 | 2261 | GoPackagePath: reflect.TypeOf(x{}).PkgPath(), | |
| 1728 | 2262 | RawDescriptor: unsafe.Slice(unsafe.StringData(file_ermite_merge_request_proto_rawDesc), len(file_ermite_merge_request_proto_rawDesc)), | |
| 1729 | - | NumEnums: 2, | |
| 1730 | - | NumMessages: 18, | |
| 2263 | + | NumEnums: 3, | |
| 2264 | + | NumMessages: 23, | |
| 1731 | 2265 | NumExtensions: 0, | |
| 1732 | 2266 | NumServices: 1, | |
| 1733 | 2267 | }, | |
| @@ -137,6 +137,60 @@ func (DiffSide) EnumDescriptor() ([]byte, []int) { | |||||
| 137 | return file_ermite_merge_request_proto_rawDescGZIP(), []int{1} | 137 | return file_ermite_merge_request_proto_rawDescGZIP(), []int{1} | ||
| 138 | } | 138 | } | ||
| 139 | 139 | ||||
| 140 | + | // Verdict is the judgement a reviewer gives with a comment. | |||
| 141 | + | type Verdict int32 | |||
| 142 | + | ||||
| 143 | + | const ( | |||
| 144 | + | // Not set. The comment carries no verdict. In AddCommentRequest it means a | |||
| 145 | + | // plain comment. | |||
| 146 | + | Verdict_VERDICT_UNSPECIFIED Verdict = 0 | |||
| 147 | + | // The reviewer approves the merge request. The comment is created resolved. | |||
| 148 | + | Verdict_VERDICT_APPROVE Verdict = 1 | |||
| 149 | + | // The reviewer asks for changes. The comment starts unresolved. | |||
| 150 | + | Verdict_VERDICT_CHANGES_REQUESTED Verdict = 2 | |||
| 151 | + | ) | |||
| 152 | + | ||||
| 153 | + | // Enum value maps for Verdict. | |||
| 154 | + | var ( | |||
| 155 | + | Verdict_name = map[int32]string{ | |||
| 156 | + | 0: "VERDICT_UNSPECIFIED", | |||
| 157 | + | 1: "VERDICT_APPROVE", | |||
| 158 | + | 2: "VERDICT_CHANGES_REQUESTED", | |||
| 159 | + | } | |||
| 160 | + | Verdict_value = map[string]int32{ | |||
| 161 | + | "VERDICT_UNSPECIFIED": 0, | |||
| 162 | + | "VERDICT_APPROVE": 1, | |||
| 163 | + | "VERDICT_CHANGES_REQUESTED": 2, | |||
| 164 | + | } | |||
| 165 | + | ) | |||
| 166 | + | ||||
| 167 | + | func (x Verdict) Enum() *Verdict { | |||
| 168 | + | p := new(Verdict) | |||
| 169 | + | *p = x | |||
| 170 | + | return p | |||
| 171 | + | } | |||
| 172 | + | ||||
| 173 | + | func (x Verdict) String() string { | |||
| 174 | + | return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) | |||
| 175 | + | } | |||
| 176 | + | ||||
| 177 | + | func (Verdict) Descriptor() protoreflect.EnumDescriptor { | |||
| 178 | + | return file_ermite_merge_request_proto_enumTypes[2].Descriptor() | |||
| 179 | + | } | |||
| 180 | + | ||||
| 181 | + | func (Verdict) Type() protoreflect.EnumType { | |||
| 182 | + | return &file_ermite_merge_request_proto_enumTypes[2] | |||
| 183 | + | } | |||
| 184 | + | ||||
| 185 | + | func (x Verdict) Number() protoreflect.EnumNumber { | |||
| 186 | + | return protoreflect.EnumNumber(x) | |||
| 187 | + | } | |||
| 188 | + | ||||
| 189 | + | // Deprecated: Use Verdict.Descriptor instead. | |||
| 190 | + | func (Verdict) EnumDescriptor() ([]byte, []int) { | |||
| 191 | + | return file_ermite_merge_request_proto_rawDescGZIP(), []int{2} | |||
| 192 | + | } | |||
| 193 | + | ||||
| 140 | // MergeRequest asks to merge one branch of a repository into another branch | 194 | // MergeRequest asks to merge one branch of a repository into another branch | ||
| 141 | // of the same repository. It is about a branch, not about who wrote it. | 195 | // of the same repository. It is about a branch, not about who wrote it. | ||
| 142 | type MergeRequest struct { | 196 | type MergeRequest struct { | ||
| @@ -326,13 +380,32 @@ type Comment struct { | |||||
| 326 | // When it differs from the current head the line may have moved; clients | 380 | // When it differs from the current head the line may have moved; clients | ||
| 327 | // may show the comment as outdated. | 381 | // may show the comment as outdated. | ||
| 328 | CommitId string `protobuf:"bytes,6,opt,name=commit_id,json=commitId,proto3" json:"commit_id,omitempty"` | 382 | CommitId string `protobuf:"bytes,6,opt,name=commit_id,json=commitId,proto3" json:"commit_id,omitempty"` | ||
| 329 | - | // Text is the plain-text content, at most 8,000 characters. Clients show it | 383 | + | // Text is the Markdown source, at most 8,000 characters. Clients render it |
| 330 | - | // escaped, with line breaks kept. | 384 | + | // as Markdown without raw HTML; "^<id>" refers to a note of the same merge |
| 385 | + | // request. Empty when deleted is true, and possibly empty for a comment | |||
| 386 | + | // that carries a verdict. | |||
| 331 | Text string `protobuf:"bytes,7,opt,name=text,proto3" json:"text,omitempty"` | 387 | Text string `protobuf:"bytes,7,opt,name=text,proto3" json:"text,omitempty"` | ||
| 332 | // Resolved is true once the comment was marked resolved. | 388 | // Resolved is true once the comment was marked resolved. | ||
| 333 | Resolved bool `protobuf:"varint,8,opt,name=resolved,proto3" json:"resolved,omitempty"` | 389 | Resolved bool `protobuf:"varint,8,opt,name=resolved,proto3" json:"resolved,omitempty"` | ||
| 334 | // CreatedAt is when the comment was written. | 390 | // CreatedAt is when the comment was written. | ||
| 335 | - | CreatedAt *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` | 391 | + | CreatedAt *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` |
| 392 | + | // ReplyTo is the id of the root comment this comment replies to. Empty for | |||
| 393 | + | // a root comment. A reply has the path, line, start_line and side of its | |||
| 394 | + | // root, and its commit_id is the head when the reply was written. Threads | |||
| 395 | + | // have one level: a reply never has replies. | |||
| 396 | + | ReplyTo string `protobuf:"bytes,10,opt,name=reply_to,json=replyTo,proto3" json:"reply_to,omitempty"` | |||
| 397 | + | // StartLine is the 1-based first line of a range that ends at line, on the | |||
| 398 | + | // same side. 0 for a comment on a single line or a general comment. | |||
| 399 | + | StartLine int32 `protobuf:"varint,11,opt,name=start_line,json=startLine,proto3" json:"start_line,omitempty"` | |||
| 400 | + | // Verdict is the judgement given with the comment. Only a root comment has | |||
| 401 | + | // one; it never changes after creation. | |||
| 402 | + | Verdict Verdict `protobuf:"varint,12,opt,name=verdict,proto3,enum=ermite.Verdict" json:"verdict,omitempty"` | |||
| 403 | + | // EditedAt is when the text was last changed or the comment was deleted. | |||
| 404 | + | // Unset if it never was. | |||
| 405 | + | EditedAt *timestamppb.Timestamp `protobuf:"bytes,13,opt,name=edited_at,json=editedAt,proto3" json:"edited_at,omitempty"` | |||
| 406 | + | // Deleted is true once the author deleted the comment. Its text is then | |||
| 407 | + | // empty; its id, anchor, replies and verdict remain. | |||
| 408 | + | Deleted bool `protobuf:"varint,14,opt,name=deleted,proto3" json:"deleted,omitempty"` | |||
| 336 | unknownFields protoimpl.UnknownFields | 409 | unknownFields protoimpl.UnknownFields | ||
| 337 | sizeCache protoimpl.SizeCache | 410 | sizeCache protoimpl.SizeCache | ||
| 338 | } | 411 | } | ||
| @@ -430,6 +503,134 @@ func (x *Comment) GetCreatedAt() *timestamppb.Timestamp { | |||||
| 430 | return nil | 503 | return nil | ||
| 431 | } | 504 | } | ||
| 432 | 505 | ||||
| 506 | + | func (x *Comment) GetReplyTo() string { | |||
| 507 | + | if x != nil { | |||
| 508 | + | return x.ReplyTo | |||
| 509 | + | } | |||
| 510 | + | return "" | |||
| 511 | + | } | |||
| 512 | + | ||||
| 513 | + | func (x *Comment) GetStartLine() int32 { | |||
| 514 | + | if x != nil { | |||
| 515 | + | return x.StartLine | |||
| 516 | + | } | |||
| 517 | + | return 0 | |||
| 518 | + | } | |||
| 519 | + | ||||
| 520 | + | func (x *Comment) GetVerdict() Verdict { | |||
| 521 | + | if x != nil { | |||
| 522 | + | return x.Verdict | |||
| 523 | + | } | |||
| 524 | + | return Verdict_VERDICT_UNSPECIFIED | |||
| 525 | + | } | |||
| 526 | + | ||||
| 527 | + | func (x *Comment) GetEditedAt() *timestamppb.Timestamp { | |||
| 528 | + | if x != nil { | |||
| 529 | + | return x.EditedAt | |||
| 530 | + | } | |||
| 531 | + | return nil | |||
| 532 | + | } | |||
| 533 | + | ||||
| 534 | + | func (x *Comment) GetDeleted() bool { | |||
| 535 | + | if x != nil { | |||
| 536 | + | return x.Deleted | |||
| 537 | + | } | |||
| 538 | + | return false | |||
| 539 | + | } | |||
| 540 | + | ||||
| 541 | + | // AuthorVerdict is the current verdict of one author on a merge request: the | |||
| 542 | + | // one given with the author's latest comment that carries a verdict. | |||
| 543 | + | type AuthorVerdict struct { | |||
| 544 | + | state protoimpl.MessageState `protogen:"open.v1"` | |||
| 545 | + | // Author names who gave the verdict, like Comment.author. | |||
| 546 | + | Author string `protobuf:"bytes,1,opt,name=author,proto3" json:"author,omitempty"` | |||
| 547 | + | // Verdict is the current verdict. Never VERDICT_UNSPECIFIED. | |||
| 548 | + | Verdict Verdict `protobuf:"varint,2,opt,name=verdict,proto3,enum=ermite.Verdict" json:"verdict,omitempty"` | |||
| 549 | + | // CommentId is the id of the comment that carries the verdict. | |||
| 550 | + | CommentId string `protobuf:"bytes,3,opt,name=comment_id,json=commentId,proto3" json:"comment_id,omitempty"` | |||
| 551 | + | // CommitId is the head of the merge request when the verdict was given. | |||
| 552 | + | CommitId string `protobuf:"bytes,4,opt,name=commit_id,json=commitId,proto3" json:"commit_id,omitempty"` | |||
| 553 | + | // CreatedAt is when the verdict was given. | |||
| 554 | + | CreatedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` | |||
| 555 | + | // Stale is true for an approval given on a commit that is not the current | |||
| 556 | + | // head. A request for changes is never stale. | |||
| 557 | + | Stale bool `protobuf:"varint,6,opt,name=stale,proto3" json:"stale,omitempty"` | |||
| 558 | + | unknownFields protoimpl.UnknownFields | |||
| 559 | + | sizeCache protoimpl.SizeCache | |||
| 560 | + | } | |||
| 561 | + | ||||
| 562 | + | func (x *AuthorVerdict) Reset() { | |||
| 563 | + | *x = AuthorVerdict{} | |||
| 564 | + | mi := &file_ermite_merge_request_proto_msgTypes[2] | |||
| 565 | + | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | |||
| 566 | + | ms.StoreMessageInfo(mi) | |||
| 567 | + | } | |||
| 568 | + | ||||
| 569 | + | func (x *AuthorVerdict) String() string { | |||
| 570 | + | return protoimpl.X.MessageStringOf(x) | |||
| 571 | + | } | |||
| 572 | + | ||||
| 573 | + | func (*AuthorVerdict) ProtoMessage() {} | |||
| 574 | + | ||||
| 575 | + | func (x *AuthorVerdict) ProtoReflect() protoreflect.Message { | |||
| 576 | + | mi := &file_ermite_merge_request_proto_msgTypes[2] | |||
| 577 | + | if x != nil { | |||
| 578 | + | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | |||
| 579 | + | if ms.LoadMessageInfo() == nil { | |||
| 580 | + | ms.StoreMessageInfo(mi) | |||
| 581 | + | } | |||
| 582 | + | return ms | |||
| 583 | + | } | |||
| 584 | + | return mi.MessageOf(x) | |||
| 585 | + | } | |||
| 586 | + | ||||
| 587 | + | // Deprecated: Use AuthorVerdict.ProtoReflect.Descriptor instead. | |||
| 588 | + | func (*AuthorVerdict) Descriptor() ([]byte, []int) { | |||
| 589 | + | return file_ermite_merge_request_proto_rawDescGZIP(), []int{2} | |||
| 590 | + | } | |||
| 591 | + | ||||
| 592 | + | func (x *AuthorVerdict) GetAuthor() string { | |||
| 593 | + | if x != nil { | |||
| 594 | + | return x.Author | |||
| 595 | + | } | |||
| 596 | + | return "" | |||
| 597 | + | } | |||
| 598 | + | ||||
| 599 | + | func (x *AuthorVerdict) GetVerdict() Verdict { | |||
| 600 | + | if x != nil { | |||
| 601 | + | return x.Verdict | |||
| 602 | + | } | |||
| 603 | + | return Verdict_VERDICT_UNSPECIFIED | |||
| 604 | + | } | |||
| 605 | + | ||||
| 606 | + | func (x *AuthorVerdict) GetCommentId() string { | |||
| 607 | + | if x != nil { | |||
| 608 | + | return x.CommentId | |||
| 609 | + | } | |||
| 610 | + | return "" | |||
| 611 | + | } | |||
| 612 | + | ||||
| 613 | + | func (x *AuthorVerdict) GetCommitId() string { | |||
| 614 | + | if x != nil { | |||
| 615 | + | return x.CommitId | |||
| 616 | + | } | |||
| 617 | + | return "" | |||
| 618 | + | } | |||
| 619 | + | ||||
| 620 | + | func (x *AuthorVerdict) GetCreatedAt() *timestamppb.Timestamp { | |||
| 621 | + | if x != nil { | |||
| 622 | + | return x.CreatedAt | |||
| 623 | + | } | |||
| 624 | + | return nil | |||
| 625 | + | } | |||
| 626 | + | ||||
| 627 | + | func (x *AuthorVerdict) GetStale() bool { | |||
| 628 | + | if x != nil { | |||
| 629 | + | return x.Stale | |||
| 630 | + | } | |||
| 631 | + | return false | |||
| 632 | + | } | |||
| 633 | + | ||||
| 433 | // CreateMergeRequestRequest describes the merge request to open. | 634 | // CreateMergeRequestRequest describes the merge request to open. | ||
| 434 | type CreateMergeRequestRequest struct { | 635 | type CreateMergeRequestRequest struct { | ||
| 435 | state protoimpl.MessageState `protogen:"open.v1"` | 636 | state protoimpl.MessageState `protogen:"open.v1"` | ||
| @@ -452,7 +653,7 @@ type CreateMergeRequestRequest struct { | |||||
| 452 | 653 | ||||
| 453 | func (x *CreateMergeRequestRequest) Reset() { | 654 | func (x *CreateMergeRequestRequest) Reset() { | ||
| 454 | *x = CreateMergeRequestRequest{} | 655 | *x = CreateMergeRequestRequest{} | ||
| 455 | - | mi := &file_ermite_merge_request_proto_msgTypes[2] | 656 | + | mi := &file_ermite_merge_request_proto_msgTypes[3] |
| 456 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | 657 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | ||
| 457 | ms.StoreMessageInfo(mi) | 658 | ms.StoreMessageInfo(mi) | ||
| 458 | } | 659 | } | ||
| @@ -464,7 +665,7 @@ func (x *CreateMergeRequestRequest) String() string { | |||||
| 464 | func (*CreateMergeRequestRequest) ProtoMessage() {} | 665 | func (*CreateMergeRequestRequest) ProtoMessage() {} | ||
| 465 | 666 | ||||
| 466 | func (x *CreateMergeRequestRequest) ProtoReflect() protoreflect.Message { | 667 | func (x *CreateMergeRequestRequest) ProtoReflect() protoreflect.Message { | ||
| 467 | - | mi := &file_ermite_merge_request_proto_msgTypes[2] | 668 | + | mi := &file_ermite_merge_request_proto_msgTypes[3] |
| 468 | if x != nil { | 669 | if x != nil { | ||
| 469 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | 670 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | ||
| 470 | if ms.LoadMessageInfo() == nil { | 671 | if ms.LoadMessageInfo() == nil { | ||
| @@ -477,7 +678,7 @@ func (x *CreateMergeRequestRequest) ProtoReflect() protoreflect.Message { | |||||
| 477 | 678 | ||||
| 478 | // Deprecated: Use CreateMergeRequestRequest.ProtoReflect.Descriptor instead. | 679 | // Deprecated: Use CreateMergeRequestRequest.ProtoReflect.Descriptor instead. | ||
| 479 | func (*CreateMergeRequestRequest) Descriptor() ([]byte, []int) { | 680 | func (*CreateMergeRequestRequest) Descriptor() ([]byte, []int) { | ||
| 480 | - | return file_ermite_merge_request_proto_rawDescGZIP(), []int{2} | 681 | + | return file_ermite_merge_request_proto_rawDescGZIP(), []int{3} |
| 481 | } | 682 | } | ||
| 482 | 683 | ||||
| 483 | func (x *CreateMergeRequestRequest) GetRepo() string { | 684 | func (x *CreateMergeRequestRequest) GetRepo() string { | ||
| @@ -526,7 +727,7 @@ type CreateMergeRequestResponse struct { | |||||
| 526 | 727 | ||||
| 527 | func (x *CreateMergeRequestResponse) Reset() { | 728 | func (x *CreateMergeRequestResponse) Reset() { | ||
| 528 | *x = CreateMergeRequestResponse{} | 729 | *x = CreateMergeRequestResponse{} | ||
| 529 | - | mi := &file_ermite_merge_request_proto_msgTypes[3] | 730 | + | mi := &file_ermite_merge_request_proto_msgTypes[4] |
| 530 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | 731 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | ||
| 531 | ms.StoreMessageInfo(mi) | 732 | ms.StoreMessageInfo(mi) | ||
| 532 | } | 733 | } | ||
| @@ -538,7 +739,7 @@ func (x *CreateMergeRequestResponse) String() string { | |||||
| 538 | func (*CreateMergeRequestResponse) ProtoMessage() {} | 739 | func (*CreateMergeRequestResponse) ProtoMessage() {} | ||
| 539 | 740 | ||||
| 540 | func (x *CreateMergeRequestResponse) ProtoReflect() protoreflect.Message { | 741 | func (x *CreateMergeRequestResponse) ProtoReflect() protoreflect.Message { | ||
| 541 | - | mi := &file_ermite_merge_request_proto_msgTypes[3] | 742 | + | mi := &file_ermite_merge_request_proto_msgTypes[4] |
| 542 | if x != nil { | 743 | if x != nil { | ||
| 543 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | 744 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | ||
| 544 | if ms.LoadMessageInfo() == nil { | 745 | if ms.LoadMessageInfo() == nil { | ||
| @@ -551,7 +752,7 @@ func (x *CreateMergeRequestResponse) ProtoReflect() protoreflect.Message { | |||||
| 551 | 752 | ||||
| 552 | // Deprecated: Use CreateMergeRequestResponse.ProtoReflect.Descriptor instead. | 753 | // Deprecated: Use CreateMergeRequestResponse.ProtoReflect.Descriptor instead. | ||
| 553 | func (*CreateMergeRequestResponse) Descriptor() ([]byte, []int) { | 754 | func (*CreateMergeRequestResponse) Descriptor() ([]byte, []int) { | ||
| 554 | - | return file_ermite_merge_request_proto_rawDescGZIP(), []int{3} | 755 | + | return file_ermite_merge_request_proto_rawDescGZIP(), []int{4} |
| 555 | } | 756 | } | ||
| 556 | 757 | ||||
| 557 | func (x *CreateMergeRequestResponse) GetMergeRequest() *MergeRequest { | 758 | func (x *CreateMergeRequestResponse) GetMergeRequest() *MergeRequest { | ||
| @@ -581,7 +782,7 @@ type ListMergeRequestsRequest struct { | |||||
| 581 | 782 | ||||
| 582 | func (x *ListMergeRequestsRequest) Reset() { | 783 | func (x *ListMergeRequestsRequest) Reset() { | ||
| 583 | *x = ListMergeRequestsRequest{} | 784 | *x = ListMergeRequestsRequest{} | ||
| 584 | - | mi := &file_ermite_merge_request_proto_msgTypes[4] | 785 | + | mi := &file_ermite_merge_request_proto_msgTypes[5] |
| 585 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | 786 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | ||
| 586 | ms.StoreMessageInfo(mi) | 787 | ms.StoreMessageInfo(mi) | ||
| 587 | } | 788 | } | ||
| @@ -593,7 +794,7 @@ func (x *ListMergeRequestsRequest) String() string { | |||||
| 593 | func (*ListMergeRequestsRequest) ProtoMessage() {} | 794 | func (*ListMergeRequestsRequest) ProtoMessage() {} | ||
| 594 | 795 | ||||
| 595 | func (x *ListMergeRequestsRequest) ProtoReflect() protoreflect.Message { | 796 | func (x *ListMergeRequestsRequest) ProtoReflect() protoreflect.Message { | ||
| 596 | - | mi := &file_ermite_merge_request_proto_msgTypes[4] | 797 | + | mi := &file_ermite_merge_request_proto_msgTypes[5] |
| 597 | if x != nil { | 798 | if x != nil { | ||
| 598 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | 799 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | ||
| 599 | if ms.LoadMessageInfo() == nil { | 800 | if ms.LoadMessageInfo() == nil { | ||
| @@ -606,7 +807,7 @@ func (x *ListMergeRequestsRequest) ProtoReflect() protoreflect.Message { | |||||
| 606 | 807 | ||||
| 607 | // Deprecated: Use ListMergeRequestsRequest.ProtoReflect.Descriptor instead. | 808 | // Deprecated: Use ListMergeRequestsRequest.ProtoReflect.Descriptor instead. | ||
| 608 | func (*ListMergeRequestsRequest) Descriptor() ([]byte, []int) { | 809 | func (*ListMergeRequestsRequest) Descriptor() ([]byte, []int) { | ||
| 609 | - | return file_ermite_merge_request_proto_rawDescGZIP(), []int{4} | 810 | + | return file_ermite_merge_request_proto_rawDescGZIP(), []int{5} |
| 610 | } | 811 | } | ||
| 611 | 812 | ||||
| 612 | func (x *ListMergeRequestsRequest) GetRepo() string { | 813 | func (x *ListMergeRequestsRequest) GetRepo() string { | ||
| @@ -651,7 +852,7 @@ type ListMergeRequestsResponse struct { | |||||
| 651 | 852 | ||||
| 652 | func (x *ListMergeRequestsResponse) Reset() { | 853 | func (x *ListMergeRequestsResponse) Reset() { | ||
| 653 | *x = ListMergeRequestsResponse{} | 854 | *x = ListMergeRequestsResponse{} | ||
| 654 | - | mi := &file_ermite_merge_request_proto_msgTypes[5] | 855 | + | mi := &file_ermite_merge_request_proto_msgTypes[6] |
| 655 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | 856 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | ||
| 656 | ms.StoreMessageInfo(mi) | 857 | ms.StoreMessageInfo(mi) | ||
| 657 | } | 858 | } | ||
| @@ -663,7 +864,7 @@ func (x *ListMergeRequestsResponse) String() string { | |||||
| 663 | func (*ListMergeRequestsResponse) ProtoMessage() {} | 864 | func (*ListMergeRequestsResponse) ProtoMessage() {} | ||
| 664 | 865 | ||||
| 665 | func (x *ListMergeRequestsResponse) ProtoReflect() protoreflect.Message { | 866 | func (x *ListMergeRequestsResponse) ProtoReflect() protoreflect.Message { | ||
| 666 | - | mi := &file_ermite_merge_request_proto_msgTypes[5] | 867 | + | mi := &file_ermite_merge_request_proto_msgTypes[6] |
| 667 | if x != nil { | 868 | if x != nil { | ||
| 668 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | 869 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | ||
| 669 | if ms.LoadMessageInfo() == nil { | 870 | if ms.LoadMessageInfo() == nil { | ||
| @@ -676,7 +877,7 @@ func (x *ListMergeRequestsResponse) ProtoReflect() protoreflect.Message { | |||||
| 676 | 877 | ||||
| 677 | // Deprecated: Use ListMergeRequestsResponse.ProtoReflect.Descriptor instead. | 878 | // Deprecated: Use ListMergeRequestsResponse.ProtoReflect.Descriptor instead. | ||
| 678 | func (*ListMergeRequestsResponse) Descriptor() ([]byte, []int) { | 879 | func (*ListMergeRequestsResponse) Descriptor() ([]byte, []int) { | ||
| 679 | - | return file_ermite_merge_request_proto_rawDescGZIP(), []int{5} | 880 | + | return file_ermite_merge_request_proto_rawDescGZIP(), []int{6} |
| 680 | } | 881 | } | ||
| 681 | 882 | ||||
| 682 | func (x *ListMergeRequestsResponse) GetMergeRequests() []*MergeRequest { | 883 | func (x *ListMergeRequestsResponse) GetMergeRequests() []*MergeRequest { | ||
| @@ -713,7 +914,7 @@ type GetMergeRequestRequest struct { | |||||
| 713 | 914 | ||||
| 714 | func (x *GetMergeRequestRequest) Reset() { | 915 | func (x *GetMergeRequestRequest) Reset() { | ||
| 715 | *x = GetMergeRequestRequest{} | 916 | *x = GetMergeRequestRequest{} | ||
| 716 | - | mi := &file_ermite_merge_request_proto_msgTypes[6] | 917 | + | mi := &file_ermite_merge_request_proto_msgTypes[7] |
| 717 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | 918 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | ||
| 718 | ms.StoreMessageInfo(mi) | 919 | ms.StoreMessageInfo(mi) | ||
| 719 | } | 920 | } | ||
| @@ -725,7 +926,7 @@ func (x *GetMergeRequestRequest) String() string { | |||||
| 725 | func (*GetMergeRequestRequest) ProtoMessage() {} | 926 | func (*GetMergeRequestRequest) ProtoMessage() {} | ||
| 726 | 927 | ||||
| 727 | func (x *GetMergeRequestRequest) ProtoReflect() protoreflect.Message { | 928 | func (x *GetMergeRequestRequest) ProtoReflect() protoreflect.Message { | ||
| 728 | - | mi := &file_ermite_merge_request_proto_msgTypes[6] | 929 | + | mi := &file_ermite_merge_request_proto_msgTypes[7] |
| 729 | if x != nil { | 930 | if x != nil { | ||
| 730 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | 931 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | ||
| 731 | if ms.LoadMessageInfo() == nil { | 932 | if ms.LoadMessageInfo() == nil { | ||
| @@ -738,7 +939,7 @@ func (x *GetMergeRequestRequest) ProtoReflect() protoreflect.Message { | |||||
| 738 | 939 | ||||
| 739 | // Deprecated: Use GetMergeRequestRequest.ProtoReflect.Descriptor instead. | 940 | // Deprecated: Use GetMergeRequestRequest.ProtoReflect.Descriptor instead. | ||
| 740 | func (*GetMergeRequestRequest) Descriptor() ([]byte, []int) { | 941 | func (*GetMergeRequestRequest) Descriptor() ([]byte, []int) { | ||
| 741 | - | return file_ermite_merge_request_proto_rawDescGZIP(), []int{6} | 942 | + | return file_ermite_merge_request_proto_rawDescGZIP(), []int{7} |
| 742 | } | 943 | } | ||
| 743 | 944 | ||||
| 744 | func (x *GetMergeRequestRequest) GetRepo() string { | 945 | func (x *GetMergeRequestRequest) GetRepo() string { | ||
| @@ -794,14 +995,17 @@ type GetMergeRequestResponse struct { | |||||
| 794 | // but that commit no longer exists in the repository: the diff is then the | 995 | // but that commit no longer exists in the repository: the diff is then the | ||
| 795 | // diff against the target. A client should tell the reader to review the | 996 | // diff against the target. A client should tell the reader to review the | ||
| 796 | // whole change again. | 997 | // whole change again. | ||
| 797 | - | LastReadLost bool `protobuf:"varint,9,opt,name=last_read_lost,json=lastReadLost,proto3" json:"last_read_lost,omitempty"` | 998 | + | LastReadLost bool `protobuf:"varint,9,opt,name=last_read_lost,json=lastReadLost,proto3" json:"last_read_lost,omitempty"` |
| 999 | + | // Verdicts are the current verdicts, one per author who gave one, ordered | |||
| 1000 | + | // by the comment that carries them, oldest first. | |||
| 1001 | + | Verdicts []*AuthorVerdict `protobuf:"bytes,10,rep,name=verdicts,proto3" json:"verdicts,omitempty"` | |||
| 798 | unknownFields protoimpl.UnknownFields | 1002 | unknownFields protoimpl.UnknownFields | ||
| 799 | sizeCache protoimpl.SizeCache | 1003 | sizeCache protoimpl.SizeCache | ||
| 800 | } | 1004 | } | ||
| 801 | 1005 | ||||
| 802 | func (x *GetMergeRequestResponse) Reset() { | 1006 | func (x *GetMergeRequestResponse) Reset() { | ||
| 803 | *x = GetMergeRequestResponse{} | 1007 | *x = GetMergeRequestResponse{} | ||
| 804 | - | mi := &file_ermite_merge_request_proto_msgTypes[7] | 1008 | + | mi := &file_ermite_merge_request_proto_msgTypes[8] |
| 805 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | 1009 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | ||
| 806 | ms.StoreMessageInfo(mi) | 1010 | ms.StoreMessageInfo(mi) | ||
| 807 | } | 1011 | } | ||
| @@ -813,7 +1017,7 @@ func (x *GetMergeRequestResponse) String() string { | |||||
| 813 | func (*GetMergeRequestResponse) ProtoMessage() {} | 1017 | func (*GetMergeRequestResponse) ProtoMessage() {} | ||
| 814 | 1018 | ||||
| 815 | func (x *GetMergeRequestResponse) ProtoReflect() protoreflect.Message { | 1019 | func (x *GetMergeRequestResponse) ProtoReflect() protoreflect.Message { | ||
| 816 | - | mi := &file_ermite_merge_request_proto_msgTypes[7] | 1020 | + | mi := &file_ermite_merge_request_proto_msgTypes[8] |
| 817 | if x != nil { | 1021 | if x != nil { | ||
| 818 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | 1022 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | ||
| 819 | if ms.LoadMessageInfo() == nil { | 1023 | if ms.LoadMessageInfo() == nil { | ||
| @@ -826,7 +1030,7 @@ func (x *GetMergeRequestResponse) ProtoReflect() protoreflect.Message { | |||||
| 826 | 1030 | ||||
| 827 | // Deprecated: Use GetMergeRequestResponse.ProtoReflect.Descriptor instead. | 1031 | // Deprecated: Use GetMergeRequestResponse.ProtoReflect.Descriptor instead. | ||
| 828 | func (*GetMergeRequestResponse) Descriptor() ([]byte, []int) { | 1032 | func (*GetMergeRequestResponse) Descriptor() ([]byte, []int) { | ||
| 829 | - | return file_ermite_merge_request_proto_rawDescGZIP(), []int{7} | 1033 | + | return file_ermite_merge_request_proto_rawDescGZIP(), []int{8} |
| 830 | } | 1034 | } | ||
| 831 | 1035 | ||||
| 832 | func (x *GetMergeRequestResponse) GetMergeRequest() *MergeRequest { | 1036 | func (x *GetMergeRequestResponse) GetMergeRequest() *MergeRequest { | ||
| @@ -892,6 +1096,13 @@ func (x *GetMergeRequestResponse) GetLastReadLost() bool { | |||||
| 892 | return false | 1096 | return false | ||
| 893 | } | 1097 | } | ||
| 894 | 1098 | ||||
| 1099 | + | func (x *GetMergeRequestResponse) GetVerdicts() []*AuthorVerdict { | |||
| 1100 | + | if x != nil { | |||
| 1101 | + | return x.Verdicts | |||
| 1102 | + | } | |||
| 1103 | + | return nil | |||
| 1104 | + | } | |||
| 1105 | + | ||||
| 895 | // AddCommentRequest describes the comment to add. | 1106 | // AddCommentRequest describes the comment to add. | ||
| 896 | type AddCommentRequest struct { | 1107 | type AddCommentRequest struct { | ||
| 897 | state protoimpl.MessageState `protogen:"open.v1"` | 1108 | state protoimpl.MessageState `protogen:"open.v1"` | ||
| @@ -909,15 +1120,26 @@ type AddCommentRequest struct { | |||||
| 909 | Line int32 `protobuf:"varint,4,opt,name=line,proto3" json:"line,omitempty"` | 1120 | Line int32 `protobuf:"varint,4,opt,name=line,proto3" json:"line,omitempty"` | ||
| 910 | // Side is the side line counts on. Required when path is set. | 1121 | // Side is the side line counts on. Required when path is set. | ||
| 911 | Side DiffSide `protobuf:"varint,5,opt,name=side,proto3,enum=ermite.DiffSide" json:"side,omitempty"` | 1122 | Side DiffSide `protobuf:"varint,5,opt,name=side,proto3,enum=ermite.DiffSide" json:"side,omitempty"` | ||
| 912 | - | // Text is the plain-text content. Required. | 1123 | + | // Text is the Markdown source. Required, except when verdict is set. |
| 913 | - | Text string `protobuf:"bytes,6,opt,name=text,proto3" json:"text,omitempty"` | 1124 | + | Text string `protobuf:"bytes,6,opt,name=text,proto3" json:"text,omitempty"` |
| 1125 | + | // ReplyTo is the id of the root comment to reply to. Empty for a new root | |||
| 1126 | + | // comment. A reply takes the anchor of its root: path, line, start_line, | |||
| 1127 | + | // side and verdict must then be unset. | |||
| 1128 | + | ReplyTo string `protobuf:"bytes,7,opt,name=reply_to,json=replyTo,proto3" json:"reply_to,omitempty"` | |||
| 1129 | + | // StartLine is the 1-based first line of a range ending at line. 0 for a | |||
| 1130 | + | // single line. Needs path; it must be lower than line, and both ends must | |||
| 1131 | + | // be lines of the diff on side. | |||
| 1132 | + | StartLine int32 `protobuf:"varint,8,opt,name=start_line,json=startLine,proto3" json:"start_line,omitempty"` | |||
| 1133 | + | // Verdict is the judgement to give. Needs the mr:review scope and a root | |||
| 1134 | + | // comment. VERDICT_UNSPECIFIED for a plain comment. | |||
| 1135 | + | Verdict Verdict `protobuf:"varint,9,opt,name=verdict,proto3,enum=ermite.Verdict" json:"verdict,omitempty"` | |||
| 914 | unknownFields protoimpl.UnknownFields | 1136 | unknownFields protoimpl.UnknownFields | ||
| 915 | sizeCache protoimpl.SizeCache | 1137 | sizeCache protoimpl.SizeCache | ||
| 916 | } | 1138 | } | ||
| 917 | 1139 | ||||
| 918 | func (x *AddCommentRequest) Reset() { | 1140 | func (x *AddCommentRequest) Reset() { | ||
| 919 | *x = AddCommentRequest{} | 1141 | *x = AddCommentRequest{} | ||
| 920 | - | mi := &file_ermite_merge_request_proto_msgTypes[8] | 1142 | + | mi := &file_ermite_merge_request_proto_msgTypes[9] |
| 921 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | 1143 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | ||
| 922 | ms.StoreMessageInfo(mi) | 1144 | ms.StoreMessageInfo(mi) | ||
| 923 | } | 1145 | } | ||
| @@ -929,7 +1151,7 @@ func (x *AddCommentRequest) String() string { | |||||
| 929 | func (*AddCommentRequest) ProtoMessage() {} | 1151 | func (*AddCommentRequest) ProtoMessage() {} | ||
| 930 | 1152 | ||||
| 931 | func (x *AddCommentRequest) ProtoReflect() protoreflect.Message { | 1153 | func (x *AddCommentRequest) ProtoReflect() protoreflect.Message { | ||
| 932 | - | mi := &file_ermite_merge_request_proto_msgTypes[8] | 1154 | + | mi := &file_ermite_merge_request_proto_msgTypes[9] |
| 933 | if x != nil { | 1155 | if x != nil { | ||
| 934 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | 1156 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | ||
| 935 | if ms.LoadMessageInfo() == nil { | 1157 | if ms.LoadMessageInfo() == nil { | ||
| @@ -942,7 +1164,7 @@ func (x *AddCommentRequest) ProtoReflect() protoreflect.Message { | |||||
| 942 | 1164 | ||||
| 943 | // Deprecated: Use AddCommentRequest.ProtoReflect.Descriptor instead. | 1165 | // Deprecated: Use AddCommentRequest.ProtoReflect.Descriptor instead. | ||
| 944 | func (*AddCommentRequest) Descriptor() ([]byte, []int) { | 1166 | func (*AddCommentRequest) Descriptor() ([]byte, []int) { | ||
| 945 | - | return file_ermite_merge_request_proto_rawDescGZIP(), []int{8} | 1167 | + | return file_ermite_merge_request_proto_rawDescGZIP(), []int{9} |
| 946 | } | 1168 | } | ||
| 947 | 1169 | ||||
| 948 | func (x *AddCommentRequest) GetRepo() string { | 1170 | func (x *AddCommentRequest) GetRepo() string { | ||
| @@ -987,6 +1209,27 @@ func (x *AddCommentRequest) GetText() string { | |||||
| 987 | return "" | 1209 | return "" | ||
| 988 | } | 1210 | } | ||
| 989 | 1211 | ||||
| 1212 | + | func (x *AddCommentRequest) GetReplyTo() string { | |||
| 1213 | + | if x != nil { | |||
| 1214 | + | return x.ReplyTo | |||
| 1215 | + | } | |||
| 1216 | + | return "" | |||
| 1217 | + | } | |||
| 1218 | + | ||||
| 1219 | + | func (x *AddCommentRequest) GetStartLine() int32 { | |||
| 1220 | + | if x != nil { | |||
| 1221 | + | return x.StartLine | |||
| 1222 | + | } | |||
| 1223 | + | return 0 | |||
| 1224 | + | } | |||
| 1225 | + | ||||
| 1226 | + | func (x *AddCommentRequest) GetVerdict() Verdict { | |||
| 1227 | + | if x != nil { | |||
| 1228 | + | return x.Verdict | |||
| 1229 | + | } | |||
| 1230 | + | return Verdict_VERDICT_UNSPECIFIED | |||
| 1231 | + | } | |||
| 1232 | + | ||||
| 990 | // AddCommentResponse holds the new comment. | 1233 | // AddCommentResponse holds the new comment. | ||
| 991 | type AddCommentResponse struct { | 1234 | type AddCommentResponse struct { | ||
| 992 | state protoimpl.MessageState `protogen:"open.v1"` | 1235 | state protoimpl.MessageState `protogen:"open.v1"` | ||
| @@ -998,7 +1241,7 @@ type AddCommentResponse struct { | |||||
| 998 | 1241 | ||||
| 999 | func (x *AddCommentResponse) Reset() { | 1242 | func (x *AddCommentResponse) Reset() { | ||
| 1000 | *x = AddCommentResponse{} | 1243 | *x = AddCommentResponse{} | ||
| 1001 | - | mi := &file_ermite_merge_request_proto_msgTypes[9] | 1244 | + | mi := &file_ermite_merge_request_proto_msgTypes[10] |
| 1002 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | 1245 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | ||
| 1003 | ms.StoreMessageInfo(mi) | 1246 | ms.StoreMessageInfo(mi) | ||
| 1004 | } | 1247 | } | ||
| @@ -1010,7 +1253,7 @@ func (x *AddCommentResponse) String() string { | |||||
| 1010 | func (*AddCommentResponse) ProtoMessage() {} | 1253 | func (*AddCommentResponse) ProtoMessage() {} | ||
| 1011 | 1254 | ||||
| 1012 | func (x *AddCommentResponse) ProtoReflect() protoreflect.Message { | 1255 | func (x *AddCommentResponse) ProtoReflect() protoreflect.Message { | ||
| 1013 | - | mi := &file_ermite_merge_request_proto_msgTypes[9] | 1256 | + | mi := &file_ermite_merge_request_proto_msgTypes[10] |
| 1014 | if x != nil { | 1257 | if x != nil { | ||
| 1015 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | 1258 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | ||
| 1016 | if ms.LoadMessageInfo() == nil { | 1259 | if ms.LoadMessageInfo() == nil { | ||
| @@ -1023,7 +1266,7 @@ func (x *AddCommentResponse) ProtoReflect() protoreflect.Message { | |||||
| 1023 | 1266 | ||||
| 1024 | // Deprecated: Use AddCommentResponse.ProtoReflect.Descriptor instead. | 1267 | // Deprecated: Use AddCommentResponse.ProtoReflect.Descriptor instead. | ||
| 1025 | func (*AddCommentResponse) Descriptor() ([]byte, []int) { | 1268 | func (*AddCommentResponse) Descriptor() ([]byte, []int) { | ||
| 1026 | - | return file_ermite_merge_request_proto_rawDescGZIP(), []int{9} | 1269 | + | return file_ermite_merge_request_proto_rawDescGZIP(), []int{10} |
| 1027 | } | 1270 | } | ||
| 1028 | 1271 | ||||
| 1029 | func (x *AddCommentResponse) GetComment() *Comment { | 1272 | func (x *AddCommentResponse) GetComment() *Comment { | ||
| @@ -1033,6 +1276,236 @@ func (x *AddCommentResponse) GetComment() *Comment { | |||||
| 1033 | return nil | 1276 | return nil | ||
| 1034 | } | 1277 | } | ||
| 1035 | 1278 | ||||
| 1279 | + | // EditCommentRequest describes the new text of a comment. | |||
| 1280 | + | type EditCommentRequest struct { | |||
| 1281 | + | state protoimpl.MessageState `protogen:"open.v1"` | |||
| 1282 | + | // Repo is the repository name. | |||
| 1283 | + | Repo string `protobuf:"bytes,1,opt,name=repo,proto3" json:"repo,omitempty"` | |||
| 1284 | + | // Number is the merge request number. | |||
| 1285 | + | Number int64 `protobuf:"varint,2,opt,name=number,proto3" json:"number,omitempty"` | |||
| 1286 | + | // CommentId is the Comment.id to edit. | |||
| 1287 | + | CommentId string `protobuf:"bytes,3,opt,name=comment_id,json=commentId,proto3" json:"comment_id,omitempty"` | |||
| 1288 | + | // Text is the new Markdown source. Required, except for a comment that | |||
| 1289 | + | // carries a verdict. | |||
| 1290 | + | Text string `protobuf:"bytes,4,opt,name=text,proto3" json:"text,omitempty"` | |||
| 1291 | + | unknownFields protoimpl.UnknownFields | |||
| 1292 | + | sizeCache protoimpl.SizeCache | |||
| 1293 | + | } | |||
| 1294 | + | ||||
| 1295 | + | func (x *EditCommentRequest) Reset() { | |||
| 1296 | + | *x = EditCommentRequest{} | |||
| 1297 | + | mi := &file_ermite_merge_request_proto_msgTypes[11] | |||
| 1298 | + | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | |||
| 1299 | + | ms.StoreMessageInfo(mi) | |||
| 1300 | + | } | |||
| 1301 | + | ||||
| 1302 | + | func (x *EditCommentRequest) String() string { | |||
| 1303 | + | return protoimpl.X.MessageStringOf(x) | |||
| 1304 | + | } | |||
| 1305 | + | ||||
| 1306 | + | func (*EditCommentRequest) ProtoMessage() {} | |||
| 1307 | + | ||||
| 1308 | + | func (x *EditCommentRequest) ProtoReflect() protoreflect.Message { | |||
| 1309 | + | mi := &file_ermite_merge_request_proto_msgTypes[11] | |||
| 1310 | + | if x != nil { | |||
| 1311 | + | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | |||
| 1312 | + | if ms.LoadMessageInfo() == nil { | |||
| 1313 | + | ms.StoreMessageInfo(mi) | |||
| 1314 | + | } | |||
| 1315 | + | return ms | |||
| 1316 | + | } | |||
| 1317 | + | return mi.MessageOf(x) | |||
| 1318 | + | } | |||
| 1319 | + | ||||
| 1320 | + | // Deprecated: Use EditCommentRequest.ProtoReflect.Descriptor instead. | |||
| 1321 | + | func (*EditCommentRequest) Descriptor() ([]byte, []int) { | |||
| 1322 | + | return file_ermite_merge_request_proto_rawDescGZIP(), []int{11} | |||
| 1323 | + | } | |||
| 1324 | + | ||||
| 1325 | + | func (x *EditCommentRequest) GetRepo() string { | |||
| 1326 | + | if x != nil { | |||
| 1327 | + | return x.Repo | |||
| 1328 | + | } | |||
| 1329 | + | return "" | |||
| 1330 | + | } | |||
| 1331 | + | ||||
| 1332 | + | func (x *EditCommentRequest) GetNumber() int64 { | |||
| 1333 | + | if x != nil { | |||
| 1334 | + | return x.Number | |||
| 1335 | + | } | |||
| 1336 | + | return 0 | |||
| 1337 | + | } | |||
| 1338 | + | ||||
| 1339 | + | func (x *EditCommentRequest) GetCommentId() string { | |||
| 1340 | + | if x != nil { | |||
| 1341 | + | return x.CommentId | |||
| 1342 | + | } | |||
| 1343 | + | return "" | |||
| 1344 | + | } | |||
| 1345 | + | ||||
| 1346 | + | func (x *EditCommentRequest) GetText() string { | |||
| 1347 | + | if x != nil { | |||
| 1348 | + | return x.Text | |||
| 1349 | + | } | |||
| 1350 | + | return "" | |||
| 1351 | + | } | |||
| 1352 | + | ||||
| 1353 | + | // EditCommentResponse holds the comment after the edit. | |||
| 1354 | + | type EditCommentResponse struct { | |||
| 1355 | + | state protoimpl.MessageState `protogen:"open.v1"` | |||
| 1356 | + | // Comment is the updated comment. | |||
| 1357 | + | Comment *Comment `protobuf:"bytes,1,opt,name=comment,proto3" json:"comment,omitempty"` | |||
| 1358 | + | unknownFields protoimpl.UnknownFields | |||
| 1359 | + | sizeCache protoimpl.SizeCache | |||
| 1360 | + | } | |||
| 1361 | + | ||||
| 1362 | + | func (x *EditCommentResponse) Reset() { | |||
| 1363 | + | *x = EditCommentResponse{} | |||
| 1364 | + | mi := &file_ermite_merge_request_proto_msgTypes[12] | |||
| 1365 | + | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | |||
| 1366 | + | ms.StoreMessageInfo(mi) | |||
| 1367 | + | } | |||
| 1368 | + | ||||
| 1369 | + | func (x *EditCommentResponse) String() string { | |||
| 1370 | + | return protoimpl.X.MessageStringOf(x) | |||
| 1371 | + | } | |||
| 1372 | + | ||||
| 1373 | + | func (*EditCommentResponse) ProtoMessage() {} | |||
| 1374 | + | ||||
| 1375 | + | func (x *EditCommentResponse) ProtoReflect() protoreflect.Message { | |||
| 1376 | + | mi := &file_ermite_merge_request_proto_msgTypes[12] | |||
| 1377 | + | if x != nil { | |||
| 1378 | + | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | |||
| 1379 | + | if ms.LoadMessageInfo() == nil { | |||
| 1380 | + | ms.StoreMessageInfo(mi) | |||
| 1381 | + | } | |||
| 1382 | + | return ms | |||
| 1383 | + | } | |||
| 1384 | + | return mi.MessageOf(x) | |||
| 1385 | + | } | |||
| 1386 | + | ||||
| 1387 | + | // Deprecated: Use EditCommentResponse.ProtoReflect.Descriptor instead. | |||
| 1388 | + | func (*EditCommentResponse) Descriptor() ([]byte, []int) { | |||
| 1389 | + | return file_ermite_merge_request_proto_rawDescGZIP(), []int{12} | |||
| 1390 | + | } | |||
| 1391 | + | ||||
| 1392 | + | func (x *EditCommentResponse) GetComment() *Comment { | |||
| 1393 | + | if x != nil { | |||
| 1394 | + | return x.Comment | |||
| 1395 | + | } | |||
| 1396 | + | return nil | |||
| 1397 | + | } | |||
| 1398 | + | ||||
| 1399 | + | // DeleteCommentRequest names the comment to delete. | |||
| 1400 | + | type DeleteCommentRequest struct { | |||
| 1401 | + | state protoimpl.MessageState `protogen:"open.v1"` | |||
| 1402 | + | // Repo is the repository name. | |||
| 1403 | + | Repo string `protobuf:"bytes,1,opt,name=repo,proto3" json:"repo,omitempty"` | |||
| 1404 | + | // Number is the merge request number. | |||
| 1405 | + | Number int64 `protobuf:"varint,2,opt,name=number,proto3" json:"number,omitempty"` | |||
| 1406 | + | // CommentId is the Comment.id to delete. | |||
| 1407 | + | CommentId string `protobuf:"bytes,3,opt,name=comment_id,json=commentId,proto3" json:"comment_id,omitempty"` | |||
| 1408 | + | unknownFields protoimpl.UnknownFields | |||
| 1409 | + | sizeCache protoimpl.SizeCache | |||
| 1410 | + | } | |||
| 1411 | + | ||||
| 1412 | + | func (x *DeleteCommentRequest) Reset() { | |||
| 1413 | + | *x = DeleteCommentRequest{} | |||
| 1414 | + | mi := &file_ermite_merge_request_proto_msgTypes[13] | |||
| 1415 | + | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | |||
| 1416 | + | ms.StoreMessageInfo(mi) | |||
| 1417 | + | } | |||
| 1418 | + | ||||
| 1419 | + | func (x *DeleteCommentRequest) String() string { | |||
| 1420 | + | return protoimpl.X.MessageStringOf(x) | |||
| 1421 | + | } | |||
| 1422 | + | ||||
| 1423 | + | func (*DeleteCommentRequest) ProtoMessage() {} | |||
| 1424 | + | ||||
| 1425 | + | func (x *DeleteCommentRequest) ProtoReflect() protoreflect.Message { | |||
| 1426 | + | mi := &file_ermite_merge_request_proto_msgTypes[13] | |||
| 1427 | + | if x != nil { | |||
| 1428 | + | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | |||
| 1429 | + | if ms.LoadMessageInfo() == nil { | |||
| 1430 | + | ms.StoreMessageInfo(mi) | |||
| 1431 | + | } | |||
| 1432 | + | return ms | |||
| 1433 | + | } | |||
| 1434 | + | return mi.MessageOf(x) | |||
| 1435 | + | } | |||
| 1436 | + | ||||
| 1437 | + | // Deprecated: Use DeleteCommentRequest.ProtoReflect.Descriptor instead. | |||
| 1438 | + | func (*DeleteCommentRequest) Descriptor() ([]byte, []int) { | |||
| 1439 | + | return file_ermite_merge_request_proto_rawDescGZIP(), []int{13} | |||
| 1440 | + | } | |||
| 1441 | + | ||||
| 1442 | + | func (x *DeleteCommentRequest) GetRepo() string { | |||
| 1443 | + | if x != nil { | |||
| 1444 | + | return x.Repo | |||
| 1445 | + | } | |||
| 1446 | + | return "" | |||
| 1447 | + | } | |||
| 1448 | + | ||||
| 1449 | + | func (x *DeleteCommentRequest) GetNumber() int64 { | |||
| 1450 | + | if x != nil { | |||
| 1451 | + | return x.Number | |||
| 1452 | + | } | |||
| 1453 | + | return 0 | |||
| 1454 | + | } | |||
| 1455 | + | ||||
| 1456 | + | func (x *DeleteCommentRequest) GetCommentId() string { | |||
| 1457 | + | if x != nil { | |||
| 1458 | + | return x.CommentId | |||
| 1459 | + | } | |||
| 1460 | + | return "" | |||
| 1461 | + | } | |||
| 1462 | + | ||||
| 1463 | + | // DeleteCommentResponse holds the comment after the deletion. | |||
| 1464 | + | type DeleteCommentResponse struct { | |||
| 1465 | + | state protoimpl.MessageState `protogen:"open.v1"` | |||
| 1466 | + | // Comment is the deleted comment. | |||
| 1467 | + | Comment *Comment `protobuf:"bytes,1,opt,name=comment,proto3" json:"comment,omitempty"` | |||
| 1468 | + | unknownFields protoimpl.UnknownFields | |||
| 1469 | + | sizeCache protoimpl.SizeCache | |||
| 1470 | + | } | |||
| 1471 | + | ||||
| 1472 | + | func (x *DeleteCommentResponse) Reset() { | |||
| 1473 | + | *x = DeleteCommentResponse{} | |||
| 1474 | + | mi := &file_ermite_merge_request_proto_msgTypes[14] | |||
| 1475 | + | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | |||
| 1476 | + | ms.StoreMessageInfo(mi) | |||
| 1477 | + | } | |||
| 1478 | + | ||||
| 1479 | + | func (x *DeleteCommentResponse) String() string { | |||
| 1480 | + | return protoimpl.X.MessageStringOf(x) | |||
| 1481 | + | } | |||
| 1482 | + | ||||
| 1483 | + | func (*DeleteCommentResponse) ProtoMessage() {} | |||
| 1484 | + | ||||
| 1485 | + | func (x *DeleteCommentResponse) ProtoReflect() protoreflect.Message { | |||
| 1486 | + | mi := &file_ermite_merge_request_proto_msgTypes[14] | |||
| 1487 | + | if x != nil { | |||
| 1488 | + | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | |||
| 1489 | + | if ms.LoadMessageInfo() == nil { | |||
| 1490 | + | ms.StoreMessageInfo(mi) | |||
| 1491 | + | } | |||
| 1492 | + | return ms | |||
| 1493 | + | } | |||
| 1494 | + | return mi.MessageOf(x) | |||
| 1495 | + | } | |||
| 1496 | + | ||||
| 1497 | + | // Deprecated: Use DeleteCommentResponse.ProtoReflect.Descriptor instead. | |||
| 1498 | + | func (*DeleteCommentResponse) Descriptor() ([]byte, []int) { | |||
| 1499 | + | return file_ermite_merge_request_proto_rawDescGZIP(), []int{14} | |||
| 1500 | + | } | |||
| 1501 | + | ||||
| 1502 | + | func (x *DeleteCommentResponse) GetComment() *Comment { | |||
| 1503 | + | if x != nil { | |||
| 1504 | + | return x.Comment | |||
| 1505 | + | } | |||
| 1506 | + | return nil | |||
| 1507 | + | } | |||
| 1508 | + | ||||
| 1036 | // ResolveCommentRequest changes the resolved state of a comment. | 1509 | // ResolveCommentRequest changes the resolved state of a comment. | ||
| 1037 | type ResolveCommentRequest struct { | 1510 | type ResolveCommentRequest struct { | ||
| 1038 | state protoimpl.MessageState `protogen:"open.v1"` | 1511 | state protoimpl.MessageState `protogen:"open.v1"` | ||
| @@ -1050,7 +1523,7 @@ type ResolveCommentRequest struct { | |||||
| 1050 | 1523 | ||||
| 1051 | func (x *ResolveCommentRequest) Reset() { | 1524 | func (x *ResolveCommentRequest) Reset() { | ||
| 1052 | *x = ResolveCommentRequest{} | 1525 | *x = ResolveCommentRequest{} | ||
| 1053 | - | mi := &file_ermite_merge_request_proto_msgTypes[10] | 1526 | + | mi := &file_ermite_merge_request_proto_msgTypes[15] |
| 1054 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | 1527 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | ||
| 1055 | ms.StoreMessageInfo(mi) | 1528 | ms.StoreMessageInfo(mi) | ||
| 1056 | } | 1529 | } | ||
| @@ -1062,7 +1535,7 @@ func (x *ResolveCommentRequest) String() string { | |||||
| 1062 | func (*ResolveCommentRequest) ProtoMessage() {} | 1535 | func (*ResolveCommentRequest) ProtoMessage() {} | ||
| 1063 | 1536 | ||||
| 1064 | func (x *ResolveCommentRequest) ProtoReflect() protoreflect.Message { | 1537 | func (x *ResolveCommentRequest) ProtoReflect() protoreflect.Message { | ||
| 1065 | - | mi := &file_ermite_merge_request_proto_msgTypes[10] | 1538 | + | mi := &file_ermite_merge_request_proto_msgTypes[15] |
| 1066 | if x != nil { | 1539 | if x != nil { | ||
| 1067 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | 1540 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | ||
| 1068 | if ms.LoadMessageInfo() == nil { | 1541 | if ms.LoadMessageInfo() == nil { | ||
| @@ -1075,7 +1548,7 @@ func (x *ResolveCommentRequest) ProtoReflect() protoreflect.Message { | |||||
| 1075 | 1548 | ||||
| 1076 | // Deprecated: Use ResolveCommentRequest.ProtoReflect.Descriptor instead. | 1549 | // Deprecated: Use ResolveCommentRequest.ProtoReflect.Descriptor instead. | ||
| 1077 | func (*ResolveCommentRequest) Descriptor() ([]byte, []int) { | 1550 | func (*ResolveCommentRequest) Descriptor() ([]byte, []int) { | ||
| 1078 | - | return file_ermite_merge_request_proto_rawDescGZIP(), []int{10} | 1551 | + | return file_ermite_merge_request_proto_rawDescGZIP(), []int{15} |
| 1079 | } | 1552 | } | ||
| 1080 | 1553 | ||||
| 1081 | func (x *ResolveCommentRequest) GetRepo() string { | 1554 | func (x *ResolveCommentRequest) GetRepo() string { | ||
| @@ -1117,7 +1590,7 @@ type ResolveCommentResponse struct { | |||||
| 1117 | 1590 | ||||
| 1118 | func (x *ResolveCommentResponse) Reset() { | 1591 | func (x *ResolveCommentResponse) Reset() { | ||
| 1119 | *x = ResolveCommentResponse{} | 1592 | *x = ResolveCommentResponse{} | ||
| 1120 | - | mi := &file_ermite_merge_request_proto_msgTypes[11] | 1593 | + | mi := &file_ermite_merge_request_proto_msgTypes[16] |
| 1121 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | 1594 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | ||
| 1122 | ms.StoreMessageInfo(mi) | 1595 | ms.StoreMessageInfo(mi) | ||
| 1123 | } | 1596 | } | ||
| @@ -1129,7 +1602,7 @@ func (x *ResolveCommentResponse) String() string { | |||||
| 1129 | func (*ResolveCommentResponse) ProtoMessage() {} | 1602 | func (*ResolveCommentResponse) ProtoMessage() {} | ||
| 1130 | 1603 | ||||
| 1131 | func (x *ResolveCommentResponse) ProtoReflect() protoreflect.Message { | 1604 | func (x *ResolveCommentResponse) ProtoReflect() protoreflect.Message { | ||
| 1132 | - | mi := &file_ermite_merge_request_proto_msgTypes[11] | 1605 | + | mi := &file_ermite_merge_request_proto_msgTypes[16] |
| 1133 | if x != nil { | 1606 | if x != nil { | ||
| 1134 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | 1607 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | ||
| 1135 | if ms.LoadMessageInfo() == nil { | 1608 | if ms.LoadMessageInfo() == nil { | ||
| @@ -1142,7 +1615,7 @@ func (x *ResolveCommentResponse) ProtoReflect() protoreflect.Message { | |||||
| 1142 | 1615 | ||||
| 1143 | // Deprecated: Use ResolveCommentResponse.ProtoReflect.Descriptor instead. | 1616 | // Deprecated: Use ResolveCommentResponse.ProtoReflect.Descriptor instead. | ||
| 1144 | func (*ResolveCommentResponse) Descriptor() ([]byte, []int) { | 1617 | func (*ResolveCommentResponse) Descriptor() ([]byte, []int) { | ||
| 1145 | - | return file_ermite_merge_request_proto_rawDescGZIP(), []int{11} | 1618 | + | return file_ermite_merge_request_proto_rawDescGZIP(), []int{16} |
| 1146 | } | 1619 | } | ||
| 1147 | 1620 | ||||
| 1148 | func (x *ResolveCommentResponse) GetComment() *Comment { | 1621 | func (x *ResolveCommentResponse) GetComment() *Comment { | ||
| @@ -1165,7 +1638,7 @@ type CloseMergeRequestRequest struct { | |||||
| 1165 | 1638 | ||||
| 1166 | func (x *CloseMergeRequestRequest) Reset() { | 1639 | func (x *CloseMergeRequestRequest) Reset() { | ||
| 1167 | *x = CloseMergeRequestRequest{} | 1640 | *x = CloseMergeRequestRequest{} | ||
| 1168 | - | mi := &file_ermite_merge_request_proto_msgTypes[12] | 1641 | + | mi := &file_ermite_merge_request_proto_msgTypes[17] |
| 1169 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | 1642 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | ||
| 1170 | ms.StoreMessageInfo(mi) | 1643 | ms.StoreMessageInfo(mi) | ||
| 1171 | } | 1644 | } | ||
| @@ -1177,7 +1650,7 @@ func (x *CloseMergeRequestRequest) String() string { | |||||
| 1177 | func (*CloseMergeRequestRequest) ProtoMessage() {} | 1650 | func (*CloseMergeRequestRequest) ProtoMessage() {} | ||
| 1178 | 1651 | ||||
| 1179 | func (x *CloseMergeRequestRequest) ProtoReflect() protoreflect.Message { | 1652 | func (x *CloseMergeRequestRequest) ProtoReflect() protoreflect.Message { | ||
| 1180 | - | mi := &file_ermite_merge_request_proto_msgTypes[12] | 1653 | + | mi := &file_ermite_merge_request_proto_msgTypes[17] |
| 1181 | if x != nil { | 1654 | if x != nil { | ||
| 1182 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | 1655 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | ||
| 1183 | if ms.LoadMessageInfo() == nil { | 1656 | if ms.LoadMessageInfo() == nil { | ||
| @@ -1190,7 +1663,7 @@ func (x *CloseMergeRequestRequest) ProtoReflect() protoreflect.Message { | |||||
| 1190 | 1663 | ||||
| 1191 | // Deprecated: Use CloseMergeRequestRequest.ProtoReflect.Descriptor instead. | 1664 | // Deprecated: Use CloseMergeRequestRequest.ProtoReflect.Descriptor instead. | ||
| 1192 | func (*CloseMergeRequestRequest) Descriptor() ([]byte, []int) { | 1665 | func (*CloseMergeRequestRequest) Descriptor() ([]byte, []int) { | ||
| 1193 | - | return file_ermite_merge_request_proto_rawDescGZIP(), []int{12} | 1666 | + | return file_ermite_merge_request_proto_rawDescGZIP(), []int{17} |
| 1194 | } | 1667 | } | ||
| 1195 | 1668 | ||||
| 1196 | func (x *CloseMergeRequestRequest) GetRepo() string { | 1669 | func (x *CloseMergeRequestRequest) GetRepo() string { | ||
| @@ -1218,7 +1691,7 @@ type CloseMergeRequestResponse struct { | |||||
| 1218 | 1691 | ||||
| 1219 | func (x *CloseMergeRequestResponse) Reset() { | 1692 | func (x *CloseMergeRequestResponse) Reset() { | ||
| 1220 | *x = CloseMergeRequestResponse{} | 1693 | *x = CloseMergeRequestResponse{} | ||
| 1221 | - | mi := &file_ermite_merge_request_proto_msgTypes[13] | 1694 | + | mi := &file_ermite_merge_request_proto_msgTypes[18] |
| 1222 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | 1695 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | ||
| 1223 | ms.StoreMessageInfo(mi) | 1696 | ms.StoreMessageInfo(mi) | ||
| 1224 | } | 1697 | } | ||
| @@ -1230,7 +1703,7 @@ func (x *CloseMergeRequestResponse) String() string { | |||||
| 1230 | func (*CloseMergeRequestResponse) ProtoMessage() {} | 1703 | func (*CloseMergeRequestResponse) ProtoMessage() {} | ||
| 1231 | 1704 | ||||
| 1232 | func (x *CloseMergeRequestResponse) ProtoReflect() protoreflect.Message { | 1705 | func (x *CloseMergeRequestResponse) ProtoReflect() protoreflect.Message { | ||
| 1233 | - | mi := &file_ermite_merge_request_proto_msgTypes[13] | 1706 | + | mi := &file_ermite_merge_request_proto_msgTypes[18] |
| 1234 | if x != nil { | 1707 | if x != nil { | ||
| 1235 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | 1708 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | ||
| 1236 | if ms.LoadMessageInfo() == nil { | 1709 | if ms.LoadMessageInfo() == nil { | ||
| @@ -1243,7 +1716,7 @@ func (x *CloseMergeRequestResponse) ProtoReflect() protoreflect.Message { | |||||
| 1243 | 1716 | ||||
| 1244 | // Deprecated: Use CloseMergeRequestResponse.ProtoReflect.Descriptor instead. | 1717 | // Deprecated: Use CloseMergeRequestResponse.ProtoReflect.Descriptor instead. | ||
| 1245 | func (*CloseMergeRequestResponse) Descriptor() ([]byte, []int) { | 1718 | func (*CloseMergeRequestResponse) Descriptor() ([]byte, []int) { | ||
| 1246 | - | return file_ermite_merge_request_proto_rawDescGZIP(), []int{13} | 1719 | + | return file_ermite_merge_request_proto_rawDescGZIP(), []int{18} |
| 1247 | } | 1720 | } | ||
| 1248 | 1721 | ||||
| 1249 | func (x *CloseMergeRequestResponse) GetMergeRequest() *MergeRequest { | 1722 | func (x *CloseMergeRequestResponse) GetMergeRequest() *MergeRequest { | ||
| @@ -1279,7 +1752,7 @@ type MergeMergeRequestRequest struct { | |||||
| 1279 | 1752 | ||||
| 1280 | func (x *MergeMergeRequestRequest) Reset() { | 1753 | func (x *MergeMergeRequestRequest) Reset() { | ||
| 1281 | *x = MergeMergeRequestRequest{} | 1754 | *x = MergeMergeRequestRequest{} | ||
| 1282 | - | mi := &file_ermite_merge_request_proto_msgTypes[14] | 1755 | + | mi := &file_ermite_merge_request_proto_msgTypes[19] |
| 1283 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | 1756 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | ||
| 1284 | ms.StoreMessageInfo(mi) | 1757 | ms.StoreMessageInfo(mi) | ||
| 1285 | } | 1758 | } | ||
| @@ -1291,7 +1764,7 @@ func (x *MergeMergeRequestRequest) String() string { | |||||
| 1291 | func (*MergeMergeRequestRequest) ProtoMessage() {} | 1764 | func (*MergeMergeRequestRequest) ProtoMessage() {} | ||
| 1292 | 1765 | ||||
| 1293 | func (x *MergeMergeRequestRequest) ProtoReflect() protoreflect.Message { | 1766 | func (x *MergeMergeRequestRequest) ProtoReflect() protoreflect.Message { | ||
| 1294 | - | mi := &file_ermite_merge_request_proto_msgTypes[14] | 1767 | + | mi := &file_ermite_merge_request_proto_msgTypes[19] |
| 1295 | if x != nil { | 1768 | if x != nil { | ||
| 1296 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | 1769 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | ||
| 1297 | if ms.LoadMessageInfo() == nil { | 1770 | if ms.LoadMessageInfo() == nil { | ||
| @@ -1304,7 +1777,7 @@ func (x *MergeMergeRequestRequest) ProtoReflect() protoreflect.Message { | |||||
| 1304 | 1777 | ||||
| 1305 | // Deprecated: Use MergeMergeRequestRequest.ProtoReflect.Descriptor instead. | 1778 | // Deprecated: Use MergeMergeRequestRequest.ProtoReflect.Descriptor instead. | ||
| 1306 | func (*MergeMergeRequestRequest) Descriptor() ([]byte, []int) { | 1779 | func (*MergeMergeRequestRequest) Descriptor() ([]byte, []int) { | ||
| 1307 | - | return file_ermite_merge_request_proto_rawDescGZIP(), []int{14} | 1780 | + | return file_ermite_merge_request_proto_rawDescGZIP(), []int{19} |
| 1308 | } | 1781 | } | ||
| 1309 | 1782 | ||||
| 1310 | func (x *MergeMergeRequestRequest) GetRepo() string { | 1783 | func (x *MergeMergeRequestRequest) GetRepo() string { | ||
| @@ -1359,7 +1832,7 @@ type MergeMergeRequestResponse struct { | |||||
| 1359 | 1832 | ||||
| 1360 | func (x *MergeMergeRequestResponse) Reset() { | 1833 | func (x *MergeMergeRequestResponse) Reset() { | ||
| 1361 | *x = MergeMergeRequestResponse{} | 1834 | *x = MergeMergeRequestResponse{} | ||
| 1362 | - | mi := &file_ermite_merge_request_proto_msgTypes[15] | 1835 | + | mi := &file_ermite_merge_request_proto_msgTypes[20] |
| 1363 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | 1836 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | ||
| 1364 | ms.StoreMessageInfo(mi) | 1837 | ms.StoreMessageInfo(mi) | ||
| 1365 | } | 1838 | } | ||
| @@ -1371,7 +1844,7 @@ func (x *MergeMergeRequestResponse) String() string { | |||||
| 1371 | func (*MergeMergeRequestResponse) ProtoMessage() {} | 1844 | func (*MergeMergeRequestResponse) ProtoMessage() {} | ||
| 1372 | 1845 | ||||
| 1373 | func (x *MergeMergeRequestResponse) ProtoReflect() protoreflect.Message { | 1846 | func (x *MergeMergeRequestResponse) ProtoReflect() protoreflect.Message { | ||
| 1374 | - | mi := &file_ermite_merge_request_proto_msgTypes[15] | 1847 | + | mi := &file_ermite_merge_request_proto_msgTypes[20] |
| 1375 | if x != nil { | 1848 | if x != nil { | ||
| 1376 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | 1849 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | ||
| 1377 | if ms.LoadMessageInfo() == nil { | 1850 | if ms.LoadMessageInfo() == nil { | ||
| @@ -1384,7 +1857,7 @@ func (x *MergeMergeRequestResponse) ProtoReflect() protoreflect.Message { | |||||
| 1384 | 1857 | ||||
| 1385 | // Deprecated: Use MergeMergeRequestResponse.ProtoReflect.Descriptor instead. | 1858 | // Deprecated: Use MergeMergeRequestResponse.ProtoReflect.Descriptor instead. | ||
| 1386 | func (*MergeMergeRequestResponse) Descriptor() ([]byte, []int) { | 1859 | func (*MergeMergeRequestResponse) Descriptor() ([]byte, []int) { | ||
| 1387 | - | return file_ermite_merge_request_proto_rawDescGZIP(), []int{15} | 1860 | + | return file_ermite_merge_request_proto_rawDescGZIP(), []int{20} |
| 1388 | } | 1861 | } | ||
| 1389 | 1862 | ||||
| 1390 | func (x *MergeMergeRequestResponse) GetMergeRequest() *MergeRequest { | 1863 | func (x *MergeMergeRequestResponse) GetMergeRequest() *MergeRequest { | ||
| @@ -1418,7 +1891,7 @@ type MarkReadRequest struct { | |||||
| 1418 | 1891 | ||||
| 1419 | func (x *MarkReadRequest) Reset() { | 1892 | func (x *MarkReadRequest) Reset() { | ||
| 1420 | *x = MarkReadRequest{} | 1893 | *x = MarkReadRequest{} | ||
| 1421 | - | mi := &file_ermite_merge_request_proto_msgTypes[16] | 1894 | + | mi := &file_ermite_merge_request_proto_msgTypes[21] |
| 1422 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | 1895 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | ||
| 1423 | ms.StoreMessageInfo(mi) | 1896 | ms.StoreMessageInfo(mi) | ||
| 1424 | } | 1897 | } | ||
| @@ -1430,7 +1903,7 @@ func (x *MarkReadRequest) String() string { | |||||
| 1430 | func (*MarkReadRequest) ProtoMessage() {} | 1903 | func (*MarkReadRequest) ProtoMessage() {} | ||
| 1431 | 1904 | ||||
| 1432 | func (x *MarkReadRequest) ProtoReflect() protoreflect.Message { | 1905 | func (x *MarkReadRequest) ProtoReflect() protoreflect.Message { | ||
| 1433 | - | mi := &file_ermite_merge_request_proto_msgTypes[16] | 1906 | + | mi := &file_ermite_merge_request_proto_msgTypes[21] |
| 1434 | if x != nil { | 1907 | if x != nil { | ||
| 1435 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | 1908 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | ||
| 1436 | if ms.LoadMessageInfo() == nil { | 1909 | if ms.LoadMessageInfo() == nil { | ||
| @@ -1443,7 +1916,7 @@ func (x *MarkReadRequest) ProtoReflect() protoreflect.Message { | |||||
| 1443 | 1916 | ||||
| 1444 | // Deprecated: Use MarkReadRequest.ProtoReflect.Descriptor instead. | 1917 | // Deprecated: Use MarkReadRequest.ProtoReflect.Descriptor instead. | ||
| 1445 | func (*MarkReadRequest) Descriptor() ([]byte, []int) { | 1918 | func (*MarkReadRequest) Descriptor() ([]byte, []int) { | ||
| 1446 | - | return file_ermite_merge_request_proto_rawDescGZIP(), []int{16} | 1919 | + | return file_ermite_merge_request_proto_rawDescGZIP(), []int{21} |
| 1447 | } | 1920 | } | ||
| 1448 | 1921 | ||||
| 1449 | func (x *MarkReadRequest) GetRepo() string { | 1922 | func (x *MarkReadRequest) GetRepo() string { | ||
| @@ -1476,7 +1949,7 @@ type MarkReadResponse struct { | |||||
| 1476 | 1949 | ||||
| 1477 | func (x *MarkReadResponse) Reset() { | 1950 | func (x *MarkReadResponse) Reset() { | ||
| 1478 | *x = MarkReadResponse{} | 1951 | *x = MarkReadResponse{} | ||
| 1479 | - | mi := &file_ermite_merge_request_proto_msgTypes[17] | 1952 | + | mi := &file_ermite_merge_request_proto_msgTypes[22] |
| 1480 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | 1953 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | ||
| 1481 | ms.StoreMessageInfo(mi) | 1954 | ms.StoreMessageInfo(mi) | ||
| 1482 | } | 1955 | } | ||
| @@ -1488,7 +1961,7 @@ func (x *MarkReadResponse) String() string { | |||||
| 1488 | func (*MarkReadResponse) ProtoMessage() {} | 1961 | func (*MarkReadResponse) ProtoMessage() {} | ||
| 1489 | 1962 | ||||
| 1490 | func (x *MarkReadResponse) ProtoReflect() protoreflect.Message { | 1963 | func (x *MarkReadResponse) ProtoReflect() protoreflect.Message { | ||
| 1491 | - | mi := &file_ermite_merge_request_proto_msgTypes[17] | 1964 | + | mi := &file_ermite_merge_request_proto_msgTypes[22] |
| 1492 | if x != nil { | 1965 | if x != nil { | ||
| 1493 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | 1966 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | ||
| 1494 | if ms.LoadMessageInfo() == nil { | 1967 | if ms.LoadMessageInfo() == nil { | ||
| @@ -1501,7 +1974,7 @@ func (x *MarkReadResponse) ProtoReflect() protoreflect.Message { | |||||
| 1501 | 1974 | ||||
| 1502 | // Deprecated: Use MarkReadResponse.ProtoReflect.Descriptor instead. | 1975 | // Deprecated: Use MarkReadResponse.ProtoReflect.Descriptor instead. | ||
| 1503 | func (*MarkReadResponse) Descriptor() ([]byte, []int) { | 1976 | func (*MarkReadResponse) Descriptor() ([]byte, []int) { | ||
| 1504 | - | return file_ermite_merge_request_proto_rawDescGZIP(), []int{17} | 1977 | + | return file_ermite_merge_request_proto_rawDescGZIP(), []int{22} |
| 1505 | } | 1978 | } | ||
| 1506 | 1979 | ||||
| 1507 | var File_ermite_merge_request_proto protoreflect.FileDescriptor | 1980 | var File_ermite_merge_request_proto protoreflect.FileDescriptor | ||
| @@ -1526,7 +1999,7 @@ const file_ermite_merge_request_proto_rawDesc = "" + | |||||
| 1526 | "\ahead_id\x18\v \x01(\tR\x06headId\x12(\n" + | 1999 | "\ahead_id\x18\v \x01(\tR\x06headId\x12(\n" + | ||
| 1527 | "\x10merged_commit_id\x18\f \x01(\tR\x0emergedCommitId\x120\n" + | 2000 | "\x10merged_commit_id\x18\f \x01(\tR\x0emergedCommitId\x120\n" + | ||
| 1528 | "\n" + | 2001 | "\n" + | ||
| 1529 | - | "merge_mode\x18\r \x01(\x0e2\x11.ermite.MergeModeR\tmergeMode\"\x87\x02\n" + | 2002 | + | "merge_mode\x18\r \x01(\x0e2\x11.ermite.MergeModeR\tmergeMode\"\xbf\x03\n" + |
| 1530 | "\aComment\x12\x0e\n" + | 2003 | "\aComment\x12\x0e\n" + | ||
| 1531 | "\x02id\x18\x01 \x01(\tR\x02id\x12\x16\n" + | 2004 | "\x02id\x18\x01 \x01(\tR\x02id\x12\x16\n" + | ||
| 1532 | "\x06author\x18\x02 \x01(\tR\x06author\x12\x12\n" + | 2005 | "\x06author\x18\x02 \x01(\tR\x06author\x12\x12\n" + | ||
| @@ -1537,7 +2010,23 @@ const file_ermite_merge_request_proto_rawDesc = "" + | |||||
| 1537 | "\x04text\x18\a \x01(\tR\x04text\x12\x1a\n" + | 2010 | "\x04text\x18\a \x01(\tR\x04text\x12\x1a\n" + | ||
| 1538 | "\bresolved\x18\b \x01(\bR\bresolved\x129\n" + | 2011 | "\bresolved\x18\b \x01(\bR\bresolved\x129\n" + | ||
| 1539 | "\n" + | 2012 | "\n" + | ||
| 1540 | - | "created_at\x18\t \x01(\v2\x1a.google.protobuf.TimestampR\tcreatedAt\"\xb1\x01\n" + | 2013 | + | "created_at\x18\t \x01(\v2\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x19\n" + |
| 2014 | + | "\breply_to\x18\n" + | |||
| 2015 | + | " \x01(\tR\areplyTo\x12\x1d\n" + | |||
| 2016 | + | "\n" + | |||
| 2017 | + | "start_line\x18\v \x01(\x05R\tstartLine\x12)\n" + | |||
| 2018 | + | "\averdict\x18\f \x01(\x0e2\x0f.ermite.VerdictR\averdict\x127\n" + | |||
| 2019 | + | "\tedited_at\x18\r \x01(\v2\x1a.google.protobuf.TimestampR\beditedAt\x12\x18\n" + | |||
| 2020 | + | "\adeleted\x18\x0e \x01(\bR\adeleted\"\xdf\x01\n" + | |||
| 2021 | + | "\rAuthorVerdict\x12\x16\n" + | |||
| 2022 | + | "\x06author\x18\x01 \x01(\tR\x06author\x12)\n" + | |||
| 2023 | + | "\averdict\x18\x02 \x01(\x0e2\x0f.ermite.VerdictR\averdict\x12\x1d\n" + | |||
| 2024 | + | "\n" + | |||
| 2025 | + | "comment_id\x18\x03 \x01(\tR\tcommentId\x12\x1b\n" + | |||
| 2026 | + | "\tcommit_id\x18\x04 \x01(\tR\bcommitId\x129\n" + | |||
| 2027 | + | "\n" + | |||
| 2028 | + | "created_at\x18\x05 \x01(\v2\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x14\n" + | |||
| 2029 | + | "\x05stale\x18\x06 \x01(\bR\x05stale\"\xb1\x01\n" + | |||
| 1541 | "\x19CreateMergeRequestRequest\x12\x12\n" + | 2030 | "\x19CreateMergeRequestRequest\x12\x12\n" + | ||
| 1542 | "\x04repo\x18\x01 \x01(\tR\x04repo\x12\x14\n" + | 2031 | "\x04repo\x18\x01 \x01(\tR\x04repo\x12\x14\n" + | ||
| 1543 | "\x05title\x18\x02 \x01(\tR\x05title\x12 \n" + | 2032 | "\x05title\x18\x02 \x01(\tR\x05title\x12 \n" + | ||
| @@ -1558,7 +2047,7 @@ const file_ermite_merge_request_proto_rawDesc = "" + | |||||
| 1558 | "\x16GetMergeRequestRequest\x12\x12\n" + | 2047 | "\x16GetMergeRequestRequest\x12\x12\n" + | ||
| 1559 | "\x04repo\x18\x01 \x01(\tR\x04repo\x12\x16\n" + | 2048 | "\x04repo\x18\x01 \x01(\tR\x04repo\x12\x16\n" + | ||
| 1560 | "\x06number\x18\x02 \x01(\x03R\x06number\x12&\n" + | 2049 | "\x06number\x18\x02 \x01(\x03R\x06number\x12&\n" + | ||
| 1561 | - | "\x0fsince_last_read\x18\x03 \x01(\bR\rsinceLastRead\"\x8d\x03\n" + | 2050 | + | "\x0fsince_last_read\x18\x03 \x01(\bR\rsinceLastRead\"\xc0\x03\n" + |
| 1562 | "\x17GetMergeRequestResponse\x129\n" + | 2051 | "\x17GetMergeRequestResponse\x129\n" + | ||
| 1563 | "\rmerge_request\x18\x01 \x01(\v2\x14.ermite.MergeRequestR\fmergeRequest\x12(\n" + | 2052 | "\rmerge_request\x18\x01 \x01(\v2\x14.ermite.MergeRequestR\fmergeRequest\x12(\n" + | ||
| 1564 | "\acommits\x18\x02 \x03(\v2\x0e.ermite.CommitR\acommits\x12+\n" + | 2053 | "\acommits\x18\x02 \x03(\v2\x0e.ermite.CommitR\acommits\x12+\n" + | ||
| @@ -1570,15 +2059,36 @@ const file_ermite_merge_request_proto_rawDesc = "" + | |||||
| 1570 | "\bcomments\x18\a \x03(\v2\x0f.ermite.CommentR\bcomments\x12 \n" + | 2059 | "\bcomments\x18\a \x03(\v2\x0f.ermite.CommentR\bcomments\x12 \n" + | ||
| 1571 | "\flast_read_id\x18\b \x01(\tR\n" + | 2060 | "\flast_read_id\x18\b \x01(\tR\n" + | ||
| 1572 | "lastReadId\x12$\n" + | 2061 | "lastReadId\x12$\n" + | ||
| 1573 | - | "\x0elast_read_lost\x18\t \x01(\bR\flastReadLost\"\xa1\x01\n" + | 2062 | + | "\x0elast_read_lost\x18\t \x01(\bR\flastReadLost\x121\n" + |
| 2063 | + | "\bverdicts\x18\n" + | |||
| 2064 | + | " \x03(\v2\x15.ermite.AuthorVerdictR\bverdicts\"\x86\x02\n" + | |||
| 1574 | "\x11AddCommentRequest\x12\x12\n" + | 2065 | "\x11AddCommentRequest\x12\x12\n" + | ||
| 1575 | "\x04repo\x18\x01 \x01(\tR\x04repo\x12\x16\n" + | 2066 | "\x04repo\x18\x01 \x01(\tR\x04repo\x12\x16\n" + | ||
| 1576 | "\x06number\x18\x02 \x01(\x03R\x06number\x12\x12\n" + | 2067 | "\x06number\x18\x02 \x01(\x03R\x06number\x12\x12\n" + | ||
| 1577 | "\x04path\x18\x03 \x01(\tR\x04path\x12\x12\n" + | 2068 | "\x04path\x18\x03 \x01(\tR\x04path\x12\x12\n" + | ||
| 1578 | "\x04line\x18\x04 \x01(\x05R\x04line\x12$\n" + | 2069 | "\x04line\x18\x04 \x01(\x05R\x04line\x12$\n" + | ||
| 1579 | "\x04side\x18\x05 \x01(\x0e2\x10.ermite.DiffSideR\x04side\x12\x12\n" + | 2070 | "\x04side\x18\x05 \x01(\x0e2\x10.ermite.DiffSideR\x04side\x12\x12\n" + | ||
| 1580 | - | "\x04text\x18\x06 \x01(\tR\x04text\"?\n" + | 2071 | + | "\x04text\x18\x06 \x01(\tR\x04text\x12\x19\n" + |
| 2072 | + | "\breply_to\x18\a \x01(\tR\areplyTo\x12\x1d\n" + | |||
| 2073 | + | "\n" + | |||
| 2074 | + | "start_line\x18\b \x01(\x05R\tstartLine\x12)\n" + | |||
| 2075 | + | "\averdict\x18\t \x01(\x0e2\x0f.ermite.VerdictR\averdict\"?\n" + | |||
| 1581 | "\x12AddCommentResponse\x12)\n" + | 2076 | "\x12AddCommentResponse\x12)\n" + | ||
| 2077 | + | "\acomment\x18\x01 \x01(\v2\x0f.ermite.CommentR\acomment\"s\n" + | |||
| 2078 | + | "\x12EditCommentRequest\x12\x12\n" + | |||
| 2079 | + | "\x04repo\x18\x01 \x01(\tR\x04repo\x12\x16\n" + | |||
| 2080 | + | "\x06number\x18\x02 \x01(\x03R\x06number\x12\x1d\n" + | |||
| 2081 | + | "\n" + | |||
| 2082 | + | "comment_id\x18\x03 \x01(\tR\tcommentId\x12\x12\n" + | |||
| 2083 | + | "\x04text\x18\x04 \x01(\tR\x04text\"@\n" + | |||
| 2084 | + | "\x13EditCommentResponse\x12)\n" + | |||
| 2085 | + | "\acomment\x18\x01 \x01(\v2\x0f.ermite.CommentR\acomment\"a\n" + | |||
| 2086 | + | "\x14DeleteCommentRequest\x12\x12\n" + | |||
| 2087 | + | "\x04repo\x18\x01 \x01(\tR\x04repo\x12\x16\n" + | |||
| 2088 | + | "\x06number\x18\x02 \x01(\x03R\x06number\x12\x1d\n" + | |||
| 2089 | + | "\n" + | |||
| 2090 | + | "comment_id\x18\x03 \x01(\tR\tcommentId\"B\n" + | |||
| 2091 | + | "\x15DeleteCommentResponse\x12)\n" + | |||
| 1582 | "\acomment\x18\x01 \x01(\v2\x0f.ermite.CommentR\acomment\"~\n" + | 2092 | "\acomment\x18\x01 \x01(\v2\x0f.ermite.CommentR\acomment\"~\n" + | ||
| 1583 | "\x15ResolveCommentRequest\x12\x12\n" + | 2093 | "\x15ResolveCommentRequest\x12\x12\n" + | ||
| 1584 | "\x04repo\x18\x01 \x01(\tR\x04repo\x12\x16\n" + | 2094 | "\x04repo\x18\x01 \x01(\tR\x04repo\x12\x16\n" + | ||
| @@ -1615,13 +2125,19 @@ const file_ermite_merge_request_proto_rawDesc = "" + | |||||
| 1615 | "\bDiffSide\x12\x19\n" + | 2125 | "\bDiffSide\x12\x19\n" + | ||
| 1616 | "\x15DIFF_SIDE_UNSPECIFIED\x10\x00\x12\x11\n" + | 2126 | "\x15DIFF_SIDE_UNSPECIFIED\x10\x00\x12\x11\n" + | ||
| 1617 | "\rDIFF_SIDE_OLD\x10\x01\x12\x11\n" + | 2127 | "\rDIFF_SIDE_OLD\x10\x01\x12\x11\n" + | ||
| 1618 | - | "\rDIFF_SIDE_NEW\x10\x022\xa9\x05\n" + | 2128 | + | "\rDIFF_SIDE_NEW\x10\x02*V\n" + |
| 2129 | + | "\aVerdict\x12\x17\n" + | |||
| 2130 | + | "\x13VERDICT_UNSPECIFIED\x10\x00\x12\x13\n" + | |||
| 2131 | + | "\x0fVERDICT_APPROVE\x10\x01\x12\x1d\n" + | |||
| 2132 | + | "\x19VERDICT_CHANGES_REQUESTED\x10\x022\xbf\x06\n" + | |||
| 1619 | "\x13MergeRequestService\x12[\n" + | 2133 | "\x13MergeRequestService\x12[\n" + | ||
| 1620 | "\x12CreateMergeRequest\x12!.ermite.CreateMergeRequestRequest\x1a\".ermite.CreateMergeRequestResponse\x12X\n" + | 2134 | "\x12CreateMergeRequest\x12!.ermite.CreateMergeRequestRequest\x1a\".ermite.CreateMergeRequestResponse\x12X\n" + | ||
| 1621 | "\x11ListMergeRequests\x12 .ermite.ListMergeRequestsRequest\x1a!.ermite.ListMergeRequestsResponse\x12R\n" + | 2135 | "\x11ListMergeRequests\x12 .ermite.ListMergeRequestsRequest\x1a!.ermite.ListMergeRequestsResponse\x12R\n" + | ||
| 1622 | "\x0fGetMergeRequest\x12\x1e.ermite.GetMergeRequestRequest\x1a\x1f.ermite.GetMergeRequestResponse\x12C\n" + | 2136 | "\x0fGetMergeRequest\x12\x1e.ermite.GetMergeRequestRequest\x1a\x1f.ermite.GetMergeRequestResponse\x12C\n" + | ||
| 1623 | "\n" + | 2137 | "\n" + | ||
| 1624 | - | "AddComment\x12\x19.ermite.AddCommentRequest\x1a\x1a.ermite.AddCommentResponse\x12O\n" + | 2138 | + | "AddComment\x12\x19.ermite.AddCommentRequest\x1a\x1a.ermite.AddCommentResponse\x12F\n" + |
| 2139 | + | "\vEditComment\x12\x1a.ermite.EditCommentRequest\x1a\x1b.ermite.EditCommentResponse\x12L\n" + | |||
| 2140 | + | "\rDeleteComment\x12\x1c.ermite.DeleteCommentRequest\x1a\x1d.ermite.DeleteCommentResponse\x12O\n" + | |||
| 1625 | "\x0eResolveComment\x12\x1d.ermite.ResolveCommentRequest\x1a\x1e.ermite.ResolveCommentResponse\x12X\n" + | 2141 | "\x0eResolveComment\x12\x1d.ermite.ResolveCommentRequest\x1a\x1e.ermite.ResolveCommentResponse\x12X\n" + | ||
| 1626 | "\x11CloseMergeRequest\x12 .ermite.CloseMergeRequestRequest\x1a!.ermite.CloseMergeRequestResponse\x12X\n" + | 2142 | "\x11CloseMergeRequest\x12 .ermite.CloseMergeRequestRequest\x1a!.ermite.CloseMergeRequestResponse\x12X\n" + | ||
| 1627 | "\x11MergeMergeRequest\x12 .ermite.MergeMergeRequestRequest\x1a!.ermite.MergeMergeRequestResponse\x12=\n" + | 2143 | "\x11MergeMergeRequest\x12 .ermite.MergeMergeRequestRequest\x1a!.ermite.MergeMergeRequestResponse\x12=\n" + | ||
| @@ -1641,77 +2157,95 @@ func file_ermite_merge_request_proto_rawDescGZIP() []byte { | |||||
| 1641 | return file_ermite_merge_request_proto_rawDescData | 2157 | return file_ermite_merge_request_proto_rawDescData | ||
| 1642 | } | 2158 | } | ||
| 1643 | 2159 | ||||
| 1644 | - | var file_ermite_merge_request_proto_enumTypes = make([]protoimpl.EnumInfo, 2) | 2160 | + | var file_ermite_merge_request_proto_enumTypes = make([]protoimpl.EnumInfo, 3) |
| 1645 | - | var file_ermite_merge_request_proto_msgTypes = make([]protoimpl.MessageInfo, 18) | 2161 | + | var file_ermite_merge_request_proto_msgTypes = make([]protoimpl.MessageInfo, 23) |
| 1646 | var file_ermite_merge_request_proto_goTypes = []any{ | 2162 | var file_ermite_merge_request_proto_goTypes = []any{ | ||
| 1647 | (MergeRequestState)(0), // 0: ermite.MergeRequestState | 2163 | (MergeRequestState)(0), // 0: ermite.MergeRequestState | ||
| 1648 | (DiffSide)(0), // 1: ermite.DiffSide | 2164 | (DiffSide)(0), // 1: ermite.DiffSide | ||
| 1649 | - | (*MergeRequest)(nil), // 2: ermite.MergeRequest | 2165 | + | (Verdict)(0), // 2: ermite.Verdict |
| 1650 | - | (*Comment)(nil), // 3: ermite.Comment | 2166 | + | (*MergeRequest)(nil), // 3: ermite.MergeRequest |
| 1651 | - | (*CreateMergeRequestRequest)(nil), // 4: ermite.CreateMergeRequestRequest | 2167 | + | (*Comment)(nil), // 4: ermite.Comment |
| 1652 | - | (*CreateMergeRequestResponse)(nil), // 5: ermite.CreateMergeRequestResponse | 2168 | + | (*AuthorVerdict)(nil), // 5: ermite.AuthorVerdict |
| 1653 | - | (*ListMergeRequestsRequest)(nil), // 6: ermite.ListMergeRequestsRequest | 2169 | + | (*CreateMergeRequestRequest)(nil), // 6: ermite.CreateMergeRequestRequest |
| 1654 | - | (*ListMergeRequestsResponse)(nil), // 7: ermite.ListMergeRequestsResponse | 2170 | + | (*CreateMergeRequestResponse)(nil), // 7: ermite.CreateMergeRequestResponse |
| 1655 | - | (*GetMergeRequestRequest)(nil), // 8: ermite.GetMergeRequestRequest | 2171 | + | (*ListMergeRequestsRequest)(nil), // 8: ermite.ListMergeRequestsRequest |
| 1656 | - | (*GetMergeRequestResponse)(nil), // 9: ermite.GetMergeRequestResponse | 2172 | + | (*ListMergeRequestsResponse)(nil), // 9: ermite.ListMergeRequestsResponse |
| 1657 | - | (*AddCommentRequest)(nil), // 10: ermite.AddCommentRequest | 2173 | + | (*GetMergeRequestRequest)(nil), // 10: ermite.GetMergeRequestRequest |
| 1658 | - | (*AddCommentResponse)(nil), // 11: ermite.AddCommentResponse | 2174 | + | (*GetMergeRequestResponse)(nil), // 11: ermite.GetMergeRequestResponse |
| 1659 | - | (*ResolveCommentRequest)(nil), // 12: ermite.ResolveCommentRequest | 2175 | + | (*AddCommentRequest)(nil), // 12: ermite.AddCommentRequest |
| 1660 | - | (*ResolveCommentResponse)(nil), // 13: ermite.ResolveCommentResponse | 2176 | + | (*AddCommentResponse)(nil), // 13: ermite.AddCommentResponse |
| 1661 | - | (*CloseMergeRequestRequest)(nil), // 14: ermite.CloseMergeRequestRequest | 2177 | + | (*EditCommentRequest)(nil), // 14: ermite.EditCommentRequest |
| 1662 | - | (*CloseMergeRequestResponse)(nil), // 15: ermite.CloseMergeRequestResponse | 2178 | + | (*EditCommentResponse)(nil), // 15: ermite.EditCommentResponse |
| 1663 | - | (*MergeMergeRequestRequest)(nil), // 16: ermite.MergeMergeRequestRequest | 2179 | + | (*DeleteCommentRequest)(nil), // 16: ermite.DeleteCommentRequest |
| 1664 | - | (*MergeMergeRequestResponse)(nil), // 17: ermite.MergeMergeRequestResponse | 2180 | + | (*DeleteCommentResponse)(nil), // 17: ermite.DeleteCommentResponse |
| 1665 | - | (*MarkReadRequest)(nil), // 18: ermite.MarkReadRequest | 2181 | + | (*ResolveCommentRequest)(nil), // 18: ermite.ResolveCommentRequest |
| 1666 | - | (*MarkReadResponse)(nil), // 19: ermite.MarkReadResponse | 2182 | + | (*ResolveCommentResponse)(nil), // 19: ermite.ResolveCommentResponse |
| 1667 | - | (*timestamppb.Timestamp)(nil), // 20: google.protobuf.Timestamp | 2183 | + | (*CloseMergeRequestRequest)(nil), // 20: ermite.CloseMergeRequestRequest |
| 1668 | - | (MergeMode)(0), // 21: ermite.MergeMode | 2184 | + | (*CloseMergeRequestResponse)(nil), // 21: ermite.CloseMergeRequestResponse |
| 1669 | - | (*Commit)(nil), // 22: ermite.Commit | 2185 | + | (*MergeMergeRequestRequest)(nil), // 22: ermite.MergeMergeRequestRequest |
| 1670 | - | (*DiffStats)(nil), // 23: ermite.DiffStats | 2186 | + | (*MergeMergeRequestResponse)(nil), // 23: ermite.MergeMergeRequestResponse |
| 1671 | - | (*Diff)(nil), // 24: ermite.Diff | 2187 | + | (*MarkReadRequest)(nil), // 24: ermite.MarkReadRequest |
| 2188 | + | (*MarkReadResponse)(nil), // 25: ermite.MarkReadResponse | |||
| 2189 | + | (*timestamppb.Timestamp)(nil), // 26: google.protobuf.Timestamp | |||
| 2190 | + | (MergeMode)(0), // 27: ermite.MergeMode | |||
| 2191 | + | (*Commit)(nil), // 28: ermite.Commit | |||
| 2192 | + | (*DiffStats)(nil), // 29: ermite.DiffStats | |||
| 2193 | + | (*Diff)(nil), // 30: ermite.Diff | |||
| 1672 | } | 2194 | } | ||
| 1673 | var file_ermite_merge_request_proto_depIdxs = []int32{ | 2195 | var file_ermite_merge_request_proto_depIdxs = []int32{ | ||
| 1674 | 0, // 0: ermite.MergeRequest.state:type_name -> ermite.MergeRequestState | 2196 | 0, // 0: ermite.MergeRequest.state:type_name -> ermite.MergeRequestState | ||
| 1675 | - | 20, // 1: ermite.MergeRequest.created_at:type_name -> google.protobuf.Timestamp | 2197 | + | 26, // 1: ermite.MergeRequest.created_at:type_name -> google.protobuf.Timestamp |
| 1676 | - | 20, // 2: ermite.MergeRequest.updated_at:type_name -> google.protobuf.Timestamp | 2198 | + | 26, // 2: ermite.MergeRequest.updated_at:type_name -> google.protobuf.Timestamp |
| 1677 | - | 21, // 3: ermite.MergeRequest.merge_mode:type_name -> ermite.MergeMode | 2199 | + | 27, // 3: ermite.MergeRequest.merge_mode:type_name -> ermite.MergeMode |
| 1678 | 1, // 4: ermite.Comment.side:type_name -> ermite.DiffSide | 2200 | 1, // 4: ermite.Comment.side:type_name -> ermite.DiffSide | ||
| 1679 | - | 20, // 5: ermite.Comment.created_at:type_name -> google.protobuf.Timestamp | 2201 | + | 26, // 5: ermite.Comment.created_at:type_name -> google.protobuf.Timestamp |
| 1680 | - | 2, // 6: ermite.CreateMergeRequestResponse.merge_request:type_name -> ermite.MergeRequest | 2202 | + | 2, // 6: ermite.Comment.verdict:type_name -> ermite.Verdict |
| 1681 | - | 0, // 7: ermite.ListMergeRequestsRequest.state:type_name -> ermite.MergeRequestState | 2203 | + | 26, // 7: ermite.Comment.edited_at:type_name -> google.protobuf.Timestamp |
| 1682 | - | 2, // 8: ermite.ListMergeRequestsResponse.merge_requests:type_name -> ermite.MergeRequest | 2204 | + | 2, // 8: ermite.AuthorVerdict.verdict:type_name -> ermite.Verdict |
| 1683 | - | 2, // 9: ermite.GetMergeRequestResponse.merge_request:type_name -> ermite.MergeRequest | 2205 | + | 26, // 9: ermite.AuthorVerdict.created_at:type_name -> google.protobuf.Timestamp |
| 1684 | - | 22, // 10: ermite.GetMergeRequestResponse.commits:type_name -> ermite.Commit | 2206 | + | 3, // 10: ermite.CreateMergeRequestResponse.merge_request:type_name -> ermite.MergeRequest |
| 1685 | - | 23, // 11: ermite.GetMergeRequestResponse.stats:type_name -> ermite.DiffStats | 2207 | + | 0, // 11: ermite.ListMergeRequestsRequest.state:type_name -> ermite.MergeRequestState |
| 1686 | - | 24, // 12: ermite.GetMergeRequestResponse.diff:type_name -> ermite.Diff | 2208 | + | 3, // 12: ermite.ListMergeRequestsResponse.merge_requests:type_name -> ermite.MergeRequest |
| 1687 | - | 3, // 13: ermite.GetMergeRequestResponse.comments:type_name -> ermite.Comment | 2209 | + | 3, // 13: ermite.GetMergeRequestResponse.merge_request:type_name -> ermite.MergeRequest |
| 1688 | - | 1, // 14: ermite.AddCommentRequest.side:type_name -> ermite.DiffSide | 2210 | + | 28, // 14: ermite.GetMergeRequestResponse.commits:type_name -> ermite.Commit |
| 1689 | - | 3, // 15: ermite.AddCommentResponse.comment:type_name -> ermite.Comment | 2211 | + | 29, // 15: ermite.GetMergeRequestResponse.stats:type_name -> ermite.DiffStats |
| 1690 | - | 3, // 16: ermite.ResolveCommentResponse.comment:type_name -> ermite.Comment | 2212 | + | 30, // 16: ermite.GetMergeRequestResponse.diff:type_name -> ermite.Diff |
| 1691 | - | 2, // 17: ermite.CloseMergeRequestResponse.merge_request:type_name -> ermite.MergeRequest | 2213 | + | 4, // 17: ermite.GetMergeRequestResponse.comments:type_name -> ermite.Comment |
| 1692 | - | 21, // 18: ermite.MergeMergeRequestRequest.mode:type_name -> ermite.MergeMode | 2214 | + | 5, // 18: ermite.GetMergeRequestResponse.verdicts:type_name -> ermite.AuthorVerdict |
| 1693 | - | 2, // 19: ermite.MergeMergeRequestResponse.merge_request:type_name -> ermite.MergeRequest | 2215 | + | 1, // 19: ermite.AddCommentRequest.side:type_name -> ermite.DiffSide |
| 1694 | - | 4, // 20: ermite.MergeRequestService.CreateMergeRequest:input_type -> ermite.CreateMergeRequestRequest | 2216 | + | 2, // 20: ermite.AddCommentRequest.verdict:type_name -> ermite.Verdict |
| 1695 | - | 6, // 21: ermite.MergeRequestService.ListMergeRequests:input_type -> ermite.ListMergeRequestsRequest | 2217 | + | 4, // 21: ermite.AddCommentResponse.comment:type_name -> ermite.Comment |
| 1696 | - | 8, // 22: ermite.MergeRequestService.GetMergeRequest:input_type -> ermite.GetMergeRequestRequest | 2218 | + | 4, // 22: ermite.EditCommentResponse.comment:type_name -> ermite.Comment |
| 1697 | - | 10, // 23: ermite.MergeRequestService.AddComment:input_type -> ermite.AddCommentRequest | 2219 | + | 4, // 23: ermite.DeleteCommentResponse.comment:type_name -> ermite.Comment |
| 1698 | - | 12, // 24: ermite.MergeRequestService.ResolveComment:input_type -> ermite.ResolveCommentRequest | 2220 | + | 4, // 24: ermite.ResolveCommentResponse.comment:type_name -> ermite.Comment |
| 1699 | - | 14, // 25: ermite.MergeRequestService.CloseMergeRequest:input_type -> ermite.CloseMergeRequestRequest | 2221 | + | 3, // 25: ermite.CloseMergeRequestResponse.merge_request:type_name -> ermite.MergeRequest |
| 1700 | - | 16, // 26: ermite.MergeRequestService.MergeMergeRequest:input_type -> ermite.MergeMergeRequestRequest | 2222 | + | 27, // 26: ermite.MergeMergeRequestRequest.mode:type_name -> ermite.MergeMode |
| 1701 | - | 18, // 27: ermite.MergeRequestService.MarkRead:input_type -> ermite.MarkReadRequest | 2223 | + | 3, // 27: ermite.MergeMergeRequestResponse.merge_request:type_name -> ermite.MergeRequest |
| 1702 | - | 5, // 28: ermite.MergeRequestService.CreateMergeRequest:output_type -> ermite.CreateMergeRequestResponse | 2224 | + | 6, // 28: ermite.MergeRequestService.CreateMergeRequest:input_type -> ermite.CreateMergeRequestRequest |
| 1703 | - | 7, // 29: ermite.MergeRequestService.ListMergeRequests:output_type -> ermite.ListMergeRequestsResponse | 2225 | + | 8, // 29: ermite.MergeRequestService.ListMergeRequests:input_type -> ermite.ListMergeRequestsRequest |
| 1704 | - | 9, // 30: ermite.MergeRequestService.GetMergeRequest:output_type -> ermite.GetMergeRequestResponse | 2226 | + | 10, // 30: ermite.MergeRequestService.GetMergeRequest:input_type -> ermite.GetMergeRequestRequest |
| 1705 | - | 11, // 31: ermite.MergeRequestService.AddComment:output_type -> ermite.AddCommentResponse | 2227 | + | 12, // 31: ermite.MergeRequestService.AddComment:input_type -> ermite.AddCommentRequest |
| 1706 | - | 13, // 32: ermite.MergeRequestService.ResolveComment:output_type -> ermite.ResolveCommentResponse | 2228 | + | 14, // 32: ermite.MergeRequestService.EditComment:input_type -> ermite.EditCommentRequest |
| 1707 | - | 15, // 33: ermite.MergeRequestService.CloseMergeRequest:output_type -> ermite.CloseMergeRequestResponse | 2229 | + | 16, // 33: ermite.MergeRequestService.DeleteComment:input_type -> ermite.DeleteCommentRequest |
| 1708 | - | 17, // 34: ermite.MergeRequestService.MergeMergeRequest:output_type -> ermite.MergeMergeRequestResponse | 2230 | + | 18, // 34: ermite.MergeRequestService.ResolveComment:input_type -> ermite.ResolveCommentRequest |
| 1709 | - | 19, // 35: ermite.MergeRequestService.MarkRead:output_type -> ermite.MarkReadResponse | 2231 | + | 20, // 35: ermite.MergeRequestService.CloseMergeRequest:input_type -> ermite.CloseMergeRequestRequest |
| 1710 | - | 28, // [28:36] is the sub-list for method output_type | 2232 | + | 22, // 36: ermite.MergeRequestService.MergeMergeRequest:input_type -> ermite.MergeMergeRequestRequest |
| 1711 | - | 20, // [20:28] is the sub-list for method input_type | 2233 | + | 24, // 37: ermite.MergeRequestService.MarkRead:input_type -> ermite.MarkReadRequest |
| 1712 | - | 20, // [20:20] is the sub-list for extension type_name | 2234 | + | 7, // 38: ermite.MergeRequestService.CreateMergeRequest:output_type -> ermite.CreateMergeRequestResponse |
| 1713 | - | 20, // [20:20] is the sub-list for extension extendee | 2235 | + | 9, // 39: ermite.MergeRequestService.ListMergeRequests:output_type -> ermite.ListMergeRequestsResponse |
| 1714 | - | 0, // [0:20] is the sub-list for field type_name | 2236 | + | 11, // 40: ermite.MergeRequestService.GetMergeRequest:output_type -> ermite.GetMergeRequestResponse |
| 2237 | + | 13, // 41: ermite.MergeRequestService.AddComment:output_type -> ermite.AddCommentResponse | |||
| 2238 | + | 15, // 42: ermite.MergeRequestService.EditComment:output_type -> ermite.EditCommentResponse | |||
| 2239 | + | 17, // 43: ermite.MergeRequestService.DeleteComment:output_type -> ermite.DeleteCommentResponse | |||
| 2240 | + | 19, // 44: ermite.MergeRequestService.ResolveComment:output_type -> ermite.ResolveCommentResponse | |||
| 2241 | + | 21, // 45: ermite.MergeRequestService.CloseMergeRequest:output_type -> ermite.CloseMergeRequestResponse | |||
| 2242 | + | 23, // 46: ermite.MergeRequestService.MergeMergeRequest:output_type -> ermite.MergeMergeRequestResponse | |||
| 2243 | + | 25, // 47: ermite.MergeRequestService.MarkRead:output_type -> ermite.MarkReadResponse | |||
| 2244 | + | 38, // [38:48] is the sub-list for method output_type | |||
| 2245 | + | 28, // [28:38] is the sub-list for method input_type | |||
| 2246 | + | 28, // [28:28] is the sub-list for extension type_name | |||
| 2247 | + | 28, // [28:28] is the sub-list for extension extendee | |||
| 2248 | + | 0, // [0:28] is the sub-list for field type_name | |||
| 1715 | } | 2249 | } | ||
| 1716 | 2250 | ||||
| 1717 | func init() { file_ermite_merge_request_proto_init() } | 2251 | func init() { file_ermite_merge_request_proto_init() } | ||
| @@ -1726,8 +2260,8 @@ func file_ermite_merge_request_proto_init() { | |||||
| 1726 | File: protoimpl.DescBuilder{ | 2260 | File: protoimpl.DescBuilder{ | ||
| 1727 | GoPackagePath: reflect.TypeOf(x{}).PkgPath(), | 2261 | GoPackagePath: reflect.TypeOf(x{}).PkgPath(), | ||
| 1728 | RawDescriptor: unsafe.Slice(unsafe.StringData(file_ermite_merge_request_proto_rawDesc), len(file_ermite_merge_request_proto_rawDesc)), | 2262 | RawDescriptor: unsafe.Slice(unsafe.StringData(file_ermite_merge_request_proto_rawDesc), len(file_ermite_merge_request_proto_rawDesc)), | ||
| 1729 | - | NumEnums: 2, | 2263 | + | NumEnums: 3, |
| 1730 | - | NumMessages: 18, | 2264 | + | NumMessages: 23, |
| 1731 | NumExtensions: 0, | 2265 | NumExtensions: 0, | ||
| 1732 | NumServices: 1, | 2266 | NumServices: 1, | ||
| 1733 | }, | 2267 | }, | ||
M gen/ermite/token.pb.go +19 -12 generated file: collapsed
M proto/ermite/event.proto +38 -0
| @@ -102,6 +102,12 @@ message Event { | |||
| 102 | 102 | RunUpdated run_updated = 12; | |
| 103 | 103 | // JobUpdated: a CI job was created or changed. | |
| 104 | 104 | JobUpdated job_updated = 13; | |
| 105 | + | // CommentEdited: the text of a merge request comment was changed. | |
| 106 | + | CommentEdited comment_edited = 14; | |
| 107 | + | // CommentDeleted: a merge request comment was deleted. | |
| 108 | + | CommentDeleted comment_deleted = 15; | |
| 109 | + | // CommentResolved: a merge request comment was resolved or unresolved. | |
| 110 | + | CommentResolved comment_resolved = 16; | |
| 105 | 111 | } | |
| 106 | 112 | } | |
| 107 | 113 | ||
| @@ -170,6 +176,38 @@ message CommentAdded { | |||
| 170 | 176 | Comment comment = 3; | |
| 171 | 177 | } | |
| 172 | 178 | ||
| 179 | + | // CommentEdited reports a comment of a merge request whose text was changed. | |
| 180 | + | message CommentEdited { | |
| 181 | + | // Repo is the name of the repository. | |
| 182 | + | string repo = 1; | |
| 183 | + | // Number is the number of the merge request. | |
| 184 | + | int64 number = 2; | |
| 185 | + | // Comment is the comment after the edit. | |
| 186 | + | Comment comment = 3; | |
| 187 | + | } | |
| 188 | + | ||
| 189 | + | // CommentDeleted reports a comment of a merge request that was deleted. The | |
| 190 | + | // comment stays in the thread with deleted set and an empty text. | |
| 191 | + | message CommentDeleted { | |
| 192 | + | // Repo is the name of the repository. | |
| 193 | + | string repo = 1; | |
| 194 | + | // Number is the number of the merge request. | |
| 195 | + | int64 number = 2; | |
| 196 | + | // Comment is the comment after the deletion. | |
| 197 | + | Comment comment = 3; | |
| 198 | + | } | |
| 199 | + | ||
| 200 | + | // CommentResolved reports a comment of a merge request whose resolved state | |
| 201 | + | // changed. | |
| 202 | + | message CommentResolved { | |
| 203 | + | // Repo is the name of the repository. | |
| 204 | + | string repo = 1; | |
| 205 | + | // Number is the number of the merge request. | |
| 206 | + | int64 number = 2; | |
| 207 | + | // Comment is the comment after the change. | |
| 208 | + | Comment comment = 3; | |
| 209 | + | } | |
| 210 | + | ||
| 173 | 211 | // Gap tells the client that events were lost: the requested resume point is | |
| 174 | 212 | // older than the server's buffer. It has no fields. The client should reload | |
| 175 | 213 | // the state it displays (repositories, refs, merge requests and their | |
| @@ -102,6 +102,12 @@ message Event { | |||||
| 102 | RunUpdated run_updated = 12; | 102 | RunUpdated run_updated = 12; | ||
| 103 | // JobUpdated: a CI job was created or changed. | 103 | // JobUpdated: a CI job was created or changed. | ||
| 104 | JobUpdated job_updated = 13; | 104 | JobUpdated job_updated = 13; | ||
| 105 | + | // CommentEdited: the text of a merge request comment was changed. | |||
| 106 | + | CommentEdited comment_edited = 14; | |||
| 107 | + | // CommentDeleted: a merge request comment was deleted. | |||
| 108 | + | CommentDeleted comment_deleted = 15; | |||
| 109 | + | // CommentResolved: a merge request comment was resolved or unresolved. | |||
| 110 | + | CommentResolved comment_resolved = 16; | |||
| 105 | } | 111 | } | ||
| 106 | } | 112 | } | ||
| 107 | 113 | ||||
| @@ -170,6 +176,38 @@ message CommentAdded { | |||||
| 170 | Comment comment = 3; | 176 | Comment comment = 3; | ||
| 171 | } | 177 | } | ||
| 172 | 178 | ||||
| 179 | + | // CommentEdited reports a comment of a merge request whose text was changed. | |||
| 180 | + | message CommentEdited { | |||
| 181 | + | // Repo is the name of the repository. | |||
| 182 | + | string repo = 1; | |||
| 183 | + | // Number is the number of the merge request. | |||
| 184 | + | int64 number = 2; | |||
| 185 | + | // Comment is the comment after the edit. | |||
| 186 | + | Comment comment = 3; | |||
| 187 | + | } | |||
| 188 | + | ||||
| 189 | + | // CommentDeleted reports a comment of a merge request that was deleted. The | |||
| 190 | + | // comment stays in the thread with deleted set and an empty text. | |||
| 191 | + | message CommentDeleted { | |||
| 192 | + | // Repo is the name of the repository. | |||
| 193 | + | string repo = 1; | |||
| 194 | + | // Number is the number of the merge request. | |||
| 195 | + | int64 number = 2; | |||
| 196 | + | // Comment is the comment after the deletion. | |||
| 197 | + | Comment comment = 3; | |||
| 198 | + | } | |||
| 199 | + | ||||
| 200 | + | // CommentResolved reports a comment of a merge request whose resolved state | |||
| 201 | + | // changed. | |||
| 202 | + | message CommentResolved { | |||
| 203 | + | // Repo is the name of the repository. | |||
| 204 | + | string repo = 1; | |||
| 205 | + | // Number is the number of the merge request. | |||
| 206 | + | int64 number = 2; | |||
| 207 | + | // Comment is the comment after the change. | |||
| 208 | + | Comment comment = 3; | |||
| 209 | + | } | |||
| 210 | + | ||||
| 173 | // Gap tells the client that events were lost: the requested resume point is | 211 | // Gap tells the client that events were lost: the requested resume point is | ||
| 174 | // older than the server's buffer. It has no fields. The client should reload | 212 | // older than the server's buffer. It has no fields. The client should reload | ||
| 175 | // the state it displays (repositories, refs, merge requests and their | 213 | // the state it displays (repositories, refs, merge requests and their | ||
M proto/ermite/merge_request.proto +128 -10
| @@ -33,6 +33,17 @@ enum DiffSide { | |||
| 33 | 33 | DIFF_SIDE_NEW = 2; | |
| 34 | 34 | } | |
| 35 | 35 | ||
| 36 | + | // Verdict is the judgement a reviewer gives with a comment. | |
| 37 | + | enum Verdict { | |
| 38 | + | // Not set. The comment carries no verdict. In AddCommentRequest it means a | |
| 39 | + | // plain comment. | |
| 40 | + | VERDICT_UNSPECIFIED = 0; | |
| 41 | + | // The reviewer approves the merge request. The comment is created resolved. | |
| 42 | + | VERDICT_APPROVE = 1; | |
| 43 | + | // The reviewer asks for changes. The comment starts unresolved. | |
| 44 | + | VERDICT_CHANGES_REQUESTED = 2; | |
| 45 | + | } | |
| 46 | + | ||
| 36 | 47 | // MergeRequest asks to merge one branch of a repository into another branch | |
| 37 | 48 | // of the same repository. It is about a branch, not about who wrote it. | |
| 38 | 49 | message MergeRequest { | |
| @@ -97,13 +108,50 @@ message Comment { | |||
| 97 | 108 | // When it differs from the current head the line may have moved; clients | |
| 98 | 109 | // may show the comment as outdated. | |
| 99 | 110 | string commit_id = 6; | |
| 100 | - | // Text is the plain-text content, at most 8,000 characters. Clients show it | |
| 101 | - | // escaped, with line breaks kept. | |
| 111 | + | // Text is the Markdown source, at most 8,000 characters. Clients render it | |
| 112 | + | // as Markdown without raw HTML; "^<id>" refers to a note of the same merge | |
| 113 | + | // request. Empty when deleted is true, and possibly empty for a comment | |
| 114 | + | // that carries a verdict. | |
| 102 | 115 | string text = 7; | |
| 103 | 116 | // Resolved is true once the comment was marked resolved. | |
| 104 | 117 | bool resolved = 8; | |
| 105 | 118 | // CreatedAt is when the comment was written. | |
| 106 | 119 | google.protobuf.Timestamp created_at = 9; | |
| 120 | + | // ReplyTo is the id of the root comment this comment replies to. Empty for | |
| 121 | + | // a root comment. A reply has the path, line, start_line and side of its | |
| 122 | + | // root, and its commit_id is the head when the reply was written. Threads | |
| 123 | + | // have one level: a reply never has replies. | |
| 124 | + | string reply_to = 10; | |
| 125 | + | // StartLine is the 1-based first line of a range that ends at line, on the | |
| 126 | + | // same side. 0 for a comment on a single line or a general comment. | |
| 127 | + | int32 start_line = 11; | |
| 128 | + | // Verdict is the judgement given with the comment. Only a root comment has | |
| 129 | + | // one; it never changes after creation. | |
| 130 | + | Verdict verdict = 12; | |
| 131 | + | // EditedAt is when the text was last changed or the comment was deleted. | |
| 132 | + | // Unset if it never was. | |
| 133 | + | google.protobuf.Timestamp edited_at = 13; | |
| 134 | + | // Deleted is true once the author deleted the comment. Its text is then | |
| 135 | + | // empty; its id, anchor, replies and verdict remain. | |
| 136 | + | bool deleted = 14; | |
| 137 | + | } | |
| 138 | + | ||
| 139 | + | // AuthorVerdict is the current verdict of one author on a merge request: the | |
| 140 | + | // one given with the author's latest comment that carries a verdict. | |
| 141 | + | message AuthorVerdict { | |
| 142 | + | // Author names who gave the verdict, like Comment.author. | |
| 143 | + | string author = 1; | |
| 144 | + | // Verdict is the current verdict. Never VERDICT_UNSPECIFIED. | |
| 145 | + | Verdict verdict = 2; | |
| 146 | + | // CommentId is the id of the comment that carries the verdict. | |
| 147 | + | string comment_id = 3; | |
| 148 | + | // CommitId is the head of the merge request when the verdict was given. | |
| 149 | + | string commit_id = 4; | |
| 150 | + | // CreatedAt is when the verdict was given. | |
| 151 | + | google.protobuf.Timestamp created_at = 5; | |
| 152 | + | // Stale is true for an approval given on a commit that is not the current | |
| 153 | + | // head. A request for changes is never stale. | |
| 154 | + | bool stale = 6; | |
| 107 | 155 | } | |
| 108 | 156 | ||
| 109 | 157 | // MergeRequestService reviews and merges branches. | |
| @@ -143,14 +191,35 @@ service MergeRequestService { | |||
| 143 | 191 | // caller last marked read with the current head. Fails with not_found if | |
| 144 | 192 | // the repository or the number is unknown. | |
| 145 | 193 | rpc GetMergeRequest(GetMergeRequestRequest) returns (GetMergeRequestResponse); | |
| 146 | - | // AddComment adds a general comment or a comment on a line of the diff. | |
| 147 | - | // Needs the mr:write scope. Fails with invalid_argument if the text breaks | |
| 148 | - | // a rule or if path, line and side do not designate a line of the current | |
| 149 | - | // diff of the merge request, and with failed_precondition if the merge | |
| 150 | - | // request is not open. | |
| 194 | + | // AddComment adds a general comment, a comment on a line or a range of | |
| 195 | + | // lines of the diff, or a reply to a root comment. Needs the mr:write | |
| 196 | + | // scope; setting a verdict also needs the mr:review scope (permission_denied | |
| 197 | + | // without it). Fails with invalid_argument if the text breaks a rule (it may | |
| 198 | + | // be empty only with a verdict), if path, line, start_line and side do not | |
| 199 | + | // designate lines of the current diff of the merge request, if reply_to is | |
| 200 | + | // not the id of a root comment that is not deleted, if a reply sets path, | |
| 201 | + | // line, start_line, side or verdict, or if a verdict is set on a reply; and | |
| 202 | + | // with failed_precondition if the merge request is not open. A comment with | |
| 203 | + | // VERDICT_APPROVE is created resolved. | |
| 151 | 204 | rpc AddComment(AddCommentRequest) returns (AddCommentResponse); | |
| 152 | - | // ResolveComment marks a comment resolved or unresolved. Needs the mr:write | |
| 153 | - | // scope. Fails with not_found if the comment is unknown and with | |
| 205 | + | // EditComment replaces the text of a comment. Needs the mr:write scope, and | |
| 206 | + | // only the author of the comment can edit it (permission_denied | |
| 207 | + | // otherwise). Fails with invalid_argument if the text breaks a rule (it may | |
| 208 | + | // be empty only for a comment with a verdict), with not_found if the comment | |
| 209 | + | // is unknown, and with failed_precondition if the merge request is not open | |
| 210 | + | // or the comment was deleted. Sending the current text succeeds and changes | |
| 211 | + | // nothing. | |
| 212 | + | rpc EditComment(EditCommentRequest) returns (EditCommentResponse); | |
| 213 | + | // DeleteComment deletes a comment: its text is emptied and deleted is set, | |
| 214 | + | // while its id, anchor, replies and verdict remain. Needs the mr:write | |
| 215 | + | // scope, and only the author of the comment can delete it | |
| 216 | + | // (permission_denied otherwise). Fails with not_found if the comment is | |
| 217 | + | // unknown and with failed_precondition if the merge request is not open. | |
| 218 | + | // Deleting a comment already deleted succeeds and changes nothing. | |
| 219 | + | rpc DeleteComment(DeleteCommentRequest) returns (DeleteCommentResponse); | |
| 220 | + | // ResolveComment marks a thread resolved or unresolved. Needs the mr:write | |
| 221 | + | // scope. Resolution belongs to the root comment: on a reply it fails with | |
| 222 | + | // invalid_argument. Fails with not_found if the comment is unknown and with | |
| 154 | 223 | // failed_precondition if the merge request is not open. Setting the state | |
| 155 | 224 | // the comment already has succeeds and changes nothing. | |
| 156 | 225 | rpc ResolveComment(ResolveCommentRequest) returns (ResolveCommentResponse); | |
| @@ -272,6 +341,9 @@ message GetMergeRequestResponse { | |||
| 272 | 341 | // diff against the target. A client should tell the reader to review the | |
| 273 | 342 | // whole change again. | |
| 274 | 343 | bool last_read_lost = 9; | |
| 344 | + | // Verdicts are the current verdicts, one per author who gave one, ordered | |
| 345 | + | // by the comment that carries them, oldest first. | |
| 346 | + | repeated AuthorVerdict verdicts = 10; | |
| 275 | 347 | } | |
| 276 | 348 | ||
| 277 | 349 | // AddCommentRequest describes the comment to add. | |
| @@ -290,8 +362,19 @@ message AddCommentRequest { | |||
| 290 | 362 | int32 line = 4; | |
| 291 | 363 | // Side is the side line counts on. Required when path is set. | |
| 292 | 364 | DiffSide side = 5; | |
| 293 | - | // Text is the plain-text content. Required. | |
| 365 | + | // Text is the Markdown source. Required, except when verdict is set. | |
| 294 | 366 | string text = 6; | |
| 367 | + | // ReplyTo is the id of the root comment to reply to. Empty for a new root | |
| 368 | + | // comment. A reply takes the anchor of its root: path, line, start_line, | |
| 369 | + | // side and verdict must then be unset. | |
| 370 | + | string reply_to = 7; | |
| 371 | + | // StartLine is the 1-based first line of a range ending at line. 0 for a | |
| 372 | + | // single line. Needs path; it must be lower than line, and both ends must | |
| 373 | + | // be lines of the diff on side. | |
| 374 | + | int32 start_line = 8; | |
| 375 | + | // Verdict is the judgement to give. Needs the mr:review scope and a root | |
| 376 | + | // comment. VERDICT_UNSPECIFIED for a plain comment. | |
| 377 | + | Verdict verdict = 9; | |
| 295 | 378 | } | |
| 296 | 379 | ||
| 297 | 380 | // AddCommentResponse holds the new comment. | |
| @@ -300,6 +383,41 @@ message AddCommentResponse { | |||
| 300 | 383 | Comment comment = 1; | |
| 301 | 384 | } | |
| 302 | 385 | ||
| 386 | + | // EditCommentRequest describes the new text of a comment. | |
| 387 | + | message EditCommentRequest { | |
| 388 | + | // Repo is the repository name. | |
| 389 | + | string repo = 1; | |
| 390 | + | // Number is the merge request number. | |
| 391 | + | int64 number = 2; | |
| 392 | + | // CommentId is the Comment.id to edit. | |
| 393 | + | string comment_id = 3; | |
| 394 | + | // Text is the new Markdown source. Required, except for a comment that | |
| 395 | + | // carries a verdict. | |
| 396 | + | string text = 4; | |
| 397 | + | } | |
| 398 | + | ||
| 399 | + | // EditCommentResponse holds the comment after the edit. | |
| 400 | + | message EditCommentResponse { | |
| 401 | + | // Comment is the updated comment. | |
| 402 | + | Comment comment = 1; | |
| 403 | + | } | |
| 404 | + | ||
| 405 | + | // DeleteCommentRequest names the comment to delete. | |
| 406 | + | message DeleteCommentRequest { | |
| 407 | + | // Repo is the repository name. | |
| 408 | + | string repo = 1; | |
| 409 | + | // Number is the merge request number. | |
| 410 | + | int64 number = 2; | |
| 411 | + | // CommentId is the Comment.id to delete. | |
| 412 | + | string comment_id = 3; | |
| 413 | + | } | |
| 414 | + | ||
| 415 | + | // DeleteCommentResponse holds the comment after the deletion. | |
| 416 | + | message DeleteCommentResponse { | |
| 417 | + | // Comment is the deleted comment. | |
| 418 | + | Comment comment = 1; | |
| 419 | + | } | |
| 420 | + | ||
| 303 | 421 | // ResolveCommentRequest changes the resolved state of a comment. | |
| 304 | 422 | message ResolveCommentRequest { | |
| 305 | 423 | // Repo is the repository name. | |
| @@ -33,6 +33,17 @@ enum DiffSide { | |||||
| 33 | DIFF_SIDE_NEW = 2; | 33 | DIFF_SIDE_NEW = 2; | ||
| 34 | } | 34 | } | ||
| 35 | 35 | ||||
| 36 | + | // Verdict is the judgement a reviewer gives with a comment. | |||
| 37 | + | enum Verdict { | |||
| 38 | + | // Not set. The comment carries no verdict. In AddCommentRequest it means a | |||
| 39 | + | // plain comment. | |||
| 40 | + | VERDICT_UNSPECIFIED = 0; | |||
| 41 | + | // The reviewer approves the merge request. The comment is created resolved. | |||
| 42 | + | VERDICT_APPROVE = 1; | |||
| 43 | + | // The reviewer asks for changes. The comment starts unresolved. | |||
| 44 | + | VERDICT_CHANGES_REQUESTED = 2; | |||
| 45 | + | } | |||
| 46 | + | ||||
| 36 | // MergeRequest asks to merge one branch of a repository into another branch | 47 | // MergeRequest asks to merge one branch of a repository into another branch | ||
| 37 | // of the same repository. It is about a branch, not about who wrote it. | 48 | // of the same repository. It is about a branch, not about who wrote it. | ||
| 38 | message MergeRequest { | 49 | message MergeRequest { | ||
| @@ -97,13 +108,50 @@ message Comment { | |||||
| 97 | // When it differs from the current head the line may have moved; clients | 108 | // When it differs from the current head the line may have moved; clients | ||
| 98 | // may show the comment as outdated. | 109 | // may show the comment as outdated. | ||
| 99 | string commit_id = 6; | 110 | string commit_id = 6; | ||
| 100 | - | // Text is the plain-text content, at most 8,000 characters. Clients show it | 111 | + | // Text is the Markdown source, at most 8,000 characters. Clients render it |
| 101 | - | // escaped, with line breaks kept. | 112 | + | // as Markdown without raw HTML; "^<id>" refers to a note of the same merge |
| 113 | + | // request. Empty when deleted is true, and possibly empty for a comment | |||
| 114 | + | // that carries a verdict. | |||
| 102 | string text = 7; | 115 | string text = 7; | ||
| 103 | // Resolved is true once the comment was marked resolved. | 116 | // Resolved is true once the comment was marked resolved. | ||
| 104 | bool resolved = 8; | 117 | bool resolved = 8; | ||
| 105 | // CreatedAt is when the comment was written. | 118 | // CreatedAt is when the comment was written. | ||
| 106 | google.protobuf.Timestamp created_at = 9; | 119 | google.protobuf.Timestamp created_at = 9; | ||
| 120 | + | // ReplyTo is the id of the root comment this comment replies to. Empty for | |||
| 121 | + | // a root comment. A reply has the path, line, start_line and side of its | |||
| 122 | + | // root, and its commit_id is the head when the reply was written. Threads | |||
| 123 | + | // have one level: a reply never has replies. | |||
| 124 | + | string reply_to = 10; | |||
| 125 | + | // StartLine is the 1-based first line of a range that ends at line, on the | |||
| 126 | + | // same side. 0 for a comment on a single line or a general comment. | |||
| 127 | + | int32 start_line = 11; | |||
| 128 | + | // Verdict is the judgement given with the comment. Only a root comment has | |||
| 129 | + | // one; it never changes after creation. | |||
| 130 | + | Verdict verdict = 12; | |||
| 131 | + | // EditedAt is when the text was last changed or the comment was deleted. | |||
| 132 | + | // Unset if it never was. | |||
| 133 | + | google.protobuf.Timestamp edited_at = 13; | |||
| 134 | + | // Deleted is true once the author deleted the comment. Its text is then | |||
| 135 | + | // empty; its id, anchor, replies and verdict remain. | |||
| 136 | + | bool deleted = 14; | |||
| 137 | + | } | |||
| 138 | + | ||||
| 139 | + | // AuthorVerdict is the current verdict of one author on a merge request: the | |||
| 140 | + | // one given with the author's latest comment that carries a verdict. | |||
| 141 | + | message AuthorVerdict { | |||
| 142 | + | // Author names who gave the verdict, like Comment.author. | |||
| 143 | + | string author = 1; | |||
| 144 | + | // Verdict is the current verdict. Never VERDICT_UNSPECIFIED. | |||
| 145 | + | Verdict verdict = 2; | |||
| 146 | + | // CommentId is the id of the comment that carries the verdict. | |||
| 147 | + | string comment_id = 3; | |||
| 148 | + | // CommitId is the head of the merge request when the verdict was given. | |||
| 149 | + | string commit_id = 4; | |||
| 150 | + | // CreatedAt is when the verdict was given. | |||
| 151 | + | google.protobuf.Timestamp created_at = 5; | |||
| 152 | + | // Stale is true for an approval given on a commit that is not the current | |||
| 153 | + | // head. A request for changes is never stale. | |||
| 154 | + | bool stale = 6; | |||
| 107 | } | 155 | } | ||
| 108 | 156 | ||||
| 109 | // MergeRequestService reviews and merges branches. | 157 | // MergeRequestService reviews and merges branches. | ||
| @@ -143,14 +191,35 @@ service MergeRequestService { | |||||
| 143 | // caller last marked read with the current head. Fails with not_found if | 191 | // caller last marked read with the current head. Fails with not_found if | ||
| 144 | // the repository or the number is unknown. | 192 | // the repository or the number is unknown. | ||
| 145 | rpc GetMergeRequest(GetMergeRequestRequest) returns (GetMergeRequestResponse); | 193 | rpc GetMergeRequest(GetMergeRequestRequest) returns (GetMergeRequestResponse); | ||
| 146 | - | // AddComment adds a general comment or a comment on a line of the diff. | 194 | + | // AddComment adds a general comment, a comment on a line or a range of |
| 147 | - | // Needs the mr:write scope. Fails with invalid_argument if the text breaks | 195 | + | // lines of the diff, or a reply to a root comment. Needs the mr:write |
| 148 | - | // a rule or if path, line and side do not designate a line of the current | 196 | + | // scope; setting a verdict also needs the mr:review scope (permission_denied |
| 149 | - | // diff of the merge request, and with failed_precondition if the merge | 197 | + | // without it). Fails with invalid_argument if the text breaks a rule (it may |
| 150 | - | // request is not open. | 198 | + | // be empty only with a verdict), if path, line, start_line and side do not |
| 199 | + | // designate lines of the current diff of the merge request, if reply_to is | |||
| 200 | + | // not the id of a root comment that is not deleted, if a reply sets path, | |||
| 201 | + | // line, start_line, side or verdict, or if a verdict is set on a reply; and | |||
| 202 | + | // with failed_precondition if the merge request is not open. A comment with | |||
| 203 | + | // VERDICT_APPROVE is created resolved. | |||
| 151 | rpc AddComment(AddCommentRequest) returns (AddCommentResponse); | 204 | rpc AddComment(AddCommentRequest) returns (AddCommentResponse); | ||
| 152 | - | // ResolveComment marks a comment resolved or unresolved. Needs the mr:write | 205 | + | // EditComment replaces the text of a comment. Needs the mr:write scope, and |
| 153 | - | // scope. Fails with not_found if the comment is unknown and with | 206 | + | // only the author of the comment can edit it (permission_denied |
| 207 | + | // otherwise). Fails with invalid_argument if the text breaks a rule (it may | |||
| 208 | + | // be empty only for a comment with a verdict), with not_found if the comment | |||
| 209 | + | // is unknown, and with failed_precondition if the merge request is not open | |||
| 210 | + | // or the comment was deleted. Sending the current text succeeds and changes | |||
| 211 | + | // nothing. | |||
| 212 | + | rpc EditComment(EditCommentRequest) returns (EditCommentResponse); | |||
| 213 | + | // DeleteComment deletes a comment: its text is emptied and deleted is set, | |||
| 214 | + | // while its id, anchor, replies and verdict remain. Needs the mr:write | |||
| 215 | + | // scope, and only the author of the comment can delete it | |||
| 216 | + | // (permission_denied otherwise). Fails with not_found if the comment is | |||
| 217 | + | // unknown and with failed_precondition if the merge request is not open. | |||
| 218 | + | // Deleting a comment already deleted succeeds and changes nothing. | |||
| 219 | + | rpc DeleteComment(DeleteCommentRequest) returns (DeleteCommentResponse); | |||
| 220 | + | // ResolveComment marks a thread resolved or unresolved. Needs the mr:write | |||
| 221 | + | // scope. Resolution belongs to the root comment: on a reply it fails with | |||
| 222 | + | // invalid_argument. Fails with not_found if the comment is unknown and with | |||
| 154 | // failed_precondition if the merge request is not open. Setting the state | 223 | // failed_precondition if the merge request is not open. Setting the state | ||
| 155 | // the comment already has succeeds and changes nothing. | 224 | // the comment already has succeeds and changes nothing. | ||
| 156 | rpc ResolveComment(ResolveCommentRequest) returns (ResolveCommentResponse); | 225 | rpc ResolveComment(ResolveCommentRequest) returns (ResolveCommentResponse); | ||
| @@ -272,6 +341,9 @@ message GetMergeRequestResponse { | |||||
| 272 | // diff against the target. A client should tell the reader to review the | 341 | // diff against the target. A client should tell the reader to review the | ||
| 273 | // whole change again. | 342 | // whole change again. | ||
| 274 | bool last_read_lost = 9; | 343 | bool last_read_lost = 9; | ||
| 344 | + | // Verdicts are the current verdicts, one per author who gave one, ordered | |||
| 345 | + | // by the comment that carries them, oldest first. | |||
| 346 | + | repeated AuthorVerdict verdicts = 10; | |||
| 275 | } | 347 | } | ||
| 276 | 348 | ||||
| 277 | // AddCommentRequest describes the comment to add. | 349 | // AddCommentRequest describes the comment to add. | ||
| @@ -290,8 +362,19 @@ message AddCommentRequest { | |||||
| 290 | int32 line = 4; | 362 | int32 line = 4; | ||
| 291 | // Side is the side line counts on. Required when path is set. | 363 | // Side is the side line counts on. Required when path is set. | ||
| 292 | DiffSide side = 5; | 364 | DiffSide side = 5; | ||
| 293 | - | // Text is the plain-text content. Required. | 365 | + | // Text is the Markdown source. Required, except when verdict is set. |
| 294 | string text = 6; | 366 | string text = 6; | ||
| 367 | + | // ReplyTo is the id of the root comment to reply to. Empty for a new root | |||
| 368 | + | // comment. A reply takes the anchor of its root: path, line, start_line, | |||
| 369 | + | // side and verdict must then be unset. | |||
| 370 | + | string reply_to = 7; | |||
| 371 | + | // StartLine is the 1-based first line of a range ending at line. 0 for a | |||
| 372 | + | // single line. Needs path; it must be lower than line, and both ends must | |||
| 373 | + | // be lines of the diff on side. | |||
| 374 | + | int32 start_line = 8; | |||
| 375 | + | // Verdict is the judgement to give. Needs the mr:review scope and a root | |||
| 376 | + | // comment. VERDICT_UNSPECIFIED for a plain comment. | |||
| 377 | + | Verdict verdict = 9; | |||
| 295 | } | 378 | } | ||
| 296 | 379 | ||||
| 297 | // AddCommentResponse holds the new comment. | 380 | // AddCommentResponse holds the new comment. | ||
| @@ -300,6 +383,41 @@ message AddCommentResponse { | |||||
| 300 | Comment comment = 1; | 383 | Comment comment = 1; | ||
| 301 | } | 384 | } | ||
| 302 | 385 | ||||
| 386 | + | // EditCommentRequest describes the new text of a comment. | |||
| 387 | + | message EditCommentRequest { | |||
| 388 | + | // Repo is the repository name. | |||
| 389 | + | string repo = 1; | |||
| 390 | + | // Number is the merge request number. | |||
| 391 | + | int64 number = 2; | |||
| 392 | + | // CommentId is the Comment.id to edit. | |||
| 393 | + | string comment_id = 3; | |||
| 394 | + | // Text is the new Markdown source. Required, except for a comment that | |||
| 395 | + | // carries a verdict. | |||
| 396 | + | string text = 4; | |||
| 397 | + | } | |||
| 398 | + | ||||
| 399 | + | // EditCommentResponse holds the comment after the edit. | |||
| 400 | + | message EditCommentResponse { | |||
| 401 | + | // Comment is the updated comment. | |||
| 402 | + | Comment comment = 1; | |||
| 403 | + | } | |||
| 404 | + | ||||
| 405 | + | // DeleteCommentRequest names the comment to delete. | |||
| 406 | + | message DeleteCommentRequest { | |||
| 407 | + | // Repo is the repository name. | |||
| 408 | + | string repo = 1; | |||
| 409 | + | // Number is the merge request number. | |||
| 410 | + | int64 number = 2; | |||
| 411 | + | // CommentId is the Comment.id to delete. | |||
| 412 | + | string comment_id = 3; | |||
| 413 | + | } | |||
| 414 | + | ||||
| 415 | + | // DeleteCommentResponse holds the comment after the deletion. | |||
| 416 | + | message DeleteCommentResponse { | |||
| 417 | + | // Comment is the deleted comment. | |||
| 418 | + | Comment comment = 1; | |||
| 419 | + | } | |||
| 420 | + | ||||
| 303 | // ResolveCommentRequest changes the resolved state of a comment. | 421 | // ResolveCommentRequest changes the resolved state of a comment. | ||
| 304 | message ResolveCommentRequest { | 422 | message ResolveCommentRequest { | ||
| 305 | // Repo is the repository name. | 423 | // Repo is the repository name. | ||
M proto/ermite/token.proto +3 -0
| @@ -39,6 +39,9 @@ enum Scope { | |||
| 39 | 39 | // SCOPE_TOKEN_ADMIN allows creating, listing and revoking tokens. Wire name: | |
| 40 | 40 | // token:admin. | |
| 41 | 41 | SCOPE_TOKEN_ADMIN = 9; | |
| 42 | + | // SCOPE_MR_REVIEW allows setting a verdict (approve, changes requested) on | |
| 43 | + | // merge request notes. Wire name: mr:review. | |
| 44 | + | SCOPE_MR_REVIEW = 10; | |
| 42 | 45 | } | |
| 43 | 46 | ||
| 44 | 47 | // Token describes a stored token. It never contains the secret nor its hash. | |
| @@ -39,6 +39,9 @@ enum Scope { | |||||
| 39 | // SCOPE_TOKEN_ADMIN allows creating, listing and revoking tokens. Wire name: | 39 | // SCOPE_TOKEN_ADMIN allows creating, listing and revoking tokens. Wire name: | ||
| 40 | // token:admin. | 40 | // token:admin. | ||
| 41 | SCOPE_TOKEN_ADMIN = 9; | 41 | SCOPE_TOKEN_ADMIN = 9; | ||
| 42 | + | // SCOPE_MR_REVIEW allows setting a verdict (approve, changes requested) on | |||
| 43 | + | // merge request notes. Wire name: mr:review. | |||
| 44 | + | SCOPE_MR_REVIEW = 10; | |||
| 42 | } | 45 | } | ||
| 43 | 46 | ||||
| 44 | // Token describes a stored token. It never contains the secret nor its hash. | 47 | // Token describes a stored token. It never contains the secret nor its hash. | ||