detached 11411cf

#1 feat(proto): merge request note threads, ranges, edits and verdicts

state
merged · 11411cf · fast-forward
branch
feat/mr-notes → main
opened
bnema ·
updated

Additive contract changes for merge request notes (ADR 0032: notes with threads, line ranges, edits and verdicts).

  • Verdict enum (approve, changes requested) and AuthorVerdict.
  • Comment: reply_to, start_line, verdict, edited_at, deleted; text is Markdown and ^N refers to a note.
  • AddCommentRequest: reply_to, start_line, verdict.
  • New EditComment and DeleteComment RPCs; GetMergeRequestResponse.verdicts.
  • Events: comment_edited, comment_deleted, comment_resolved.
  • Scope SCOPE_MR_REVIEW (mr:review).

Checks: buf lint, buf breaking against main, buf generate (gen up to date), go vet, go build, go mod tidy.

Release: after merge, tag v0.8.0 (signed) and mirror main and the tag to GitHub; ermite then requires bnema.dev/ermite-api v0.8.0.

CommitSubjectAuthorDateSignatureStatus
11411cfdocs(proto): list the note events of WatchbriceGPG Verified
0be2bc9feat(proto): merge request note threads, ranges, edits and verdictsbriceGPG Verified

Checks 4

9 files · +1286 -215
4/4
M docs/services.md +1 -1
@@ -5,7 +5,7 @@
55 | `RepoService` | `ListRepos`, `GetRepo`, `CreateRepo`, `UpdateRepo` (field mask, merge settings), `DeleteRepo` |
66 | `GitService` | `ListRefs`, `GetTree`, `ListPaths`, `GetBlob` (streamed), `ListCommits`, `GetCommit` (structured diff), `ResolveRevision` |
77 | `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` |
99 | `SessionService` | `CreateLoginLink`, `SignOutEverywhere` (owner only) |
1010 | `EventService` | `Watch` (streamed, resumable) |
1111 | `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/event.connect.go +8 -6
@@ -47,7 +47,8 @@ type EventServiceClient interface {
4747 //
4848 // The events are repo_created, repo_updated, repo_deleted, pushed, gap and,
4949 // for merge requests, merge_request_opened, merge_request_merged,
50- // merge_request_closed and comment_added. Each one is delivered on the
50+ // merge_request_closed, comment_added, comment_edited, comment_deleted and
51+ // comment_resolved (a thread resolved or reopened). Each one is delivered on the
5152 // "repo:<name>" topic of its repository and on "home", subject to the
5253 // visibility of the repository.
5354 //
@@ -60,8 +61,8 @@ type EventServiceClient interface {
6061 // is not guaranteed, between jobs and runs or between two updates of the same
6162 // one: a client keeps the copy with the higher Run.version or
6263 // RunJob.version and drops the other. There is no event for a change of title or
63- // description, nor for a resolved comment: after a gap, or to see such
64- // changes, clients read the merge request again. A merge publishes
64+ // description: after a gap, or to see such changes, clients read the merge
65+ // request again. A merge publishes
6566 // merge_request_merged, then pushed for the target branch.
6667 //
6768 // The server keeps a bounded buffer of recent events. With resume_after set,
@@ -119,7 +120,8 @@ type EventServiceHandler interface {
119120 //
120121 // The events are repo_created, repo_updated, repo_deleted, pushed, gap and,
121122 // for merge requests, merge_request_opened, merge_request_merged,
122- // merge_request_closed and comment_added. Each one is delivered on the
123+ // merge_request_closed, comment_added, comment_edited, comment_deleted and
124+ // comment_resolved (a thread resolved or reopened). Each one is delivered on the
123125 // "repo:<name>" topic of its repository and on "home", subject to the
124126 // visibility of the repository.
125127 //
@@ -132,8 +134,8 @@ type EventServiceHandler interface {
132134 // is not guaranteed, between jobs and runs or between two updates of the same
133135 // one: a client keeps the copy with the higher Run.version or
134136 // RunJob.version and drops the other. There is no event for a change of title or
135- // description, nor for a resolved comment: after a gap, or to see such
136- // changes, clients read the merge request again. A merge publishes
137+ // description: after a gap, or to see such changes, clients read the merge
138+ // request again. A merge publishes
137139 // merge_request_merged, then pushed for the target branch.
138140 //
139141 // The server keeps a bounded buffer of recent events. With resume_after set,
@@ -47,7 +47,8 @@ type EventServiceClient interface {
47 //47 //
48 // The events are repo_created, repo_updated, repo_deleted, pushed, gap and,48 // The events are repo_created, repo_updated, repo_deleted, pushed, gap and,
49 // for merge requests, merge_request_opened, merge_request_merged,49 // for merge requests, merge_request_opened, merge_request_merged,
50- // merge_request_closed and comment_added. Each one is delivered on the50+ // merge_request_closed, comment_added, comment_edited, comment_deleted and
51+ // comment_resolved (a thread resolved or reopened). Each one is delivered on the
51 // "repo:<name>" topic of its repository and on "home", subject to the52 // "repo:<name>" topic of its repository and on "home", subject to the
52 // visibility of the repository.53 // visibility of the repository.
53 //54 //
@@ -60,8 +61,8 @@ type EventServiceClient interface {
60 // is not guaranteed, between jobs and runs or between two updates of the same61 // is not guaranteed, between jobs and runs or between two updates of the same
61 // one: a client keeps the copy with the higher Run.version or62 // one: a client keeps the copy with the higher Run.version or
62 // RunJob.version and drops the other. There is no event for a change of title or63 // RunJob.version and drops the other. There is no event for a change of title or
63- // description, nor for a resolved comment: after a gap, or to see such64+ // description: after a gap, or to see such changes, clients read the merge
64- // changes, clients read the merge request again. A merge publishes65+ // request again. A merge publishes
65 // merge_request_merged, then pushed for the target branch.66 // merge_request_merged, then pushed for the target branch.
66 //67 //
67 // The server keeps a bounded buffer of recent events. With resume_after set,68 // The server keeps a bounded buffer of recent events. With resume_after set,
@@ -119,7 +120,8 @@ type EventServiceHandler interface {
119 //120 //
120 // The events are repo_created, repo_updated, repo_deleted, pushed, gap and,121 // The events are repo_created, repo_updated, repo_deleted, pushed, gap and,
121 // for merge requests, merge_request_opened, merge_request_merged,122 // for merge requests, merge_request_opened, merge_request_merged,
122- // merge_request_closed and comment_added. Each one is delivered on the123+ // merge_request_closed, comment_added, comment_edited, comment_deleted and
124+ // comment_resolved (a thread resolved or reopened). Each one is delivered on the
123 // "repo:<name>" topic of its repository and on "home", subject to the125 // "repo:<name>" topic of its repository and on "home", subject to the
124 // visibility of the repository.126 // visibility of the repository.
125 //127 //
@@ -132,8 +134,8 @@ type EventServiceHandler interface {
132 // is not guaranteed, between jobs and runs or between two updates of the same134 // is not guaranteed, between jobs and runs or between two updates of the same
133 // one: a client keeps the copy with the higher Run.version or135 // one: a client keeps the copy with the higher Run.version or
134 // RunJob.version and drops the other. There is no event for a change of title or136 // RunJob.version and drops the other. There is no event for a change of title or
135- // description, nor for a resolved comment: after a gap, or to see such137+ // description: after a gap, or to see such changes, clients read the merge
136- // changes, clients read the merge request again. A merge publishes138+ // request again. A merge publishes
137 // merge_request_merged, then pushed for the target branch.139 // merge_request_merged, then pushed for the target branch.
138 //140 //
139 // The server keeps a bounded buffer of recent events. With resume_after set,141 // The server keeps a bounded buffer of recent events. With resume_after set,
M gen/ermite/ermiteconnect/merge_request.connect.go +110 -14
@@ -47,6 +47,12 @@ const (
4747 // MergeRequestServiceAddCommentProcedure is the fully-qualified name of the MergeRequestService's
4848 // AddComment RPC.
4949 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"
5056 // MergeRequestServiceResolveCommentProcedure is the fully-qualified name of the
5157 // MergeRequestService's ResolveComment RPC.
5258 MergeRequestServiceResolveCommentProcedure = "/ermite.MergeRequestService/ResolveComment"
@@ -79,14 +85,35 @@ type MergeRequestServiceClient interface {
7985 // caller last marked read with the current head. Fails with not_found if
8086 // the repository or the number is unknown.
8187 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.
8798 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
90117 // failed_precondition if the merge request is not open. Setting the state
91118 // the comment already has succeeds and changes nothing.
92119 ResolveComment(context.Context, *connect.Request[ermite.ResolveCommentRequest]) (*connect.Response[ermite.ResolveCommentResponse], error)
@@ -149,6 +176,18 @@ func NewMergeRequestServiceClient(httpClient connect.HTTPClient, baseURL string,
149176 connect.WithSchema(mergeRequestServiceMethods.ByName("AddComment")),
150177 connect.WithClientOptions(opts...),
151178 ),
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+ ),
152191 resolveComment: connect.NewClient[ermite.ResolveCommentRequest, ermite.ResolveCommentResponse](
153192 httpClient,
154193 baseURL+MergeRequestServiceResolveCommentProcedure,
@@ -182,6 +221,8 @@ type mergeRequestServiceClient struct {
182221 listMergeRequests *connect.Client[ermite.ListMergeRequestsRequest, ermite.ListMergeRequestsResponse]
183222 getMergeRequest *connect.Client[ermite.GetMergeRequestRequest, ermite.GetMergeRequestResponse]
184223 addComment *connect.Client[ermite.AddCommentRequest, ermite.AddCommentResponse]
224+ editComment *connect.Client[ermite.EditCommentRequest, ermite.EditCommentResponse]
225+ deleteComment *connect.Client[ermite.DeleteCommentRequest, ermite.DeleteCommentResponse]
185226 resolveComment *connect.Client[ermite.ResolveCommentRequest, ermite.ResolveCommentResponse]
186227 closeMergeRequest *connect.Client[ermite.CloseMergeRequestRequest, ermite.CloseMergeRequestResponse]
187228 mergeMergeRequest *connect.Client[ermite.MergeMergeRequestRequest, ermite.MergeMergeRequestResponse]
@@ -208,6 +249,16 @@ func (c *mergeRequestServiceClient) AddComment(ctx context.Context, req *connect
208249 return c.addComment.CallUnary(ctx, req)
209250 }
210251
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+
211262 // ResolveComment calls ermite.MergeRequestService.ResolveComment.
212263 func (c *mergeRequestServiceClient) ResolveComment(ctx context.Context, req *connect.Request[ermite.ResolveCommentRequest]) (*connect.Response[ermite.ResolveCommentResponse], error) {
213264 return c.resolveComment.CallUnary(ctx, req)
@@ -246,14 +297,35 @@ type MergeRequestServiceHandler interface {
246297 // caller last marked read with the current head. Fails with not_found if
247298 // the repository or the number is unknown.
248299 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.
254310 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
257329 // failed_precondition if the merge request is not open. Setting the state
258330 // the comment already has succeeds and changes nothing.
259331 ResolveComment(context.Context, *connect.Request[ermite.ResolveCommentRequest]) (*connect.Response[ermite.ResolveCommentResponse], error)
@@ -312,6 +384,18 @@ func NewMergeRequestServiceHandler(svc MergeRequestServiceHandler, opts ...conne
312384 connect.WithSchema(mergeRequestServiceMethods.ByName("AddComment")),
313385 connect.WithHandlerOptions(opts...),
314386 )
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+ )
315399 mergeRequestServiceResolveCommentHandler := connect.NewUnaryHandler(
316400 MergeRequestServiceResolveCommentProcedure,
317401 svc.ResolveComment,
@@ -346,6 +430,10 @@ func NewMergeRequestServiceHandler(svc MergeRequestServiceHandler, opts ...conne
346430 mergeRequestServiceGetMergeRequestHandler.ServeHTTP(w, r)
347431 case MergeRequestServiceAddCommentProcedure:
348432 mergeRequestServiceAddCommentHandler.ServeHTTP(w, r)
433+ case MergeRequestServiceEditCommentProcedure:
434+ mergeRequestServiceEditCommentHandler.ServeHTTP(w, r)
435+ case MergeRequestServiceDeleteCommentProcedure:
436+ mergeRequestServiceDeleteCommentHandler.ServeHTTP(w, r)
349437 case MergeRequestServiceResolveCommentProcedure:
350438 mergeRequestServiceResolveCommentHandler.ServeHTTP(w, r)
351439 case MergeRequestServiceCloseMergeRequestProcedure:
@@ -379,6 +467,14 @@ func (UnimplementedMergeRequestServiceHandler) AddComment(context.Context, *conn
379467 return nil, connect.NewError(connect.CodeUnimplemented, errors.New("ermite.MergeRequestService.AddComment is not implemented"))
380468 }
381469
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+
382478 func (UnimplementedMergeRequestServiceHandler) ResolveComment(context.Context, *connect.Request[ermite.ResolveCommentRequest]) (*connect.Response[ermite.ResolveCommentResponse], error) {
383479 return nil, connect.NewError(connect.CodeUnimplemented, errors.New("ermite.MergeRequestService.ResolveComment is not implemented"))
384480 }
@@ -47,6 +47,12 @@ const (
47 // MergeRequestServiceAddCommentProcedure is the fully-qualified name of the MergeRequestService's47 // 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 the56 // 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 if85 // 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 breaks89+ // 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 current90+ // scope; setting a verdict also needs the mr:review scope (permission_denied
85- // diff of the merge request, and with failed_precondition if the merge91+ // 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:write99+ // 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 with100+ // 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 state117 // 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 if297 // 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 breaks301+ // 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 current302+ // scope; setting a verdict also needs the mr:review scope (permission_denied
252- // diff of the merge request, and with failed_precondition if the merge303+ // 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:write311+ // 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 with312+ // 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 state329 // 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) {
137137 return file_ermite_merge_request_proto_rawDescGZIP(), []int{1}
138138 }
139139
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+
140194 // MergeRequest asks to merge one branch of a repository into another branch
141195 // of the same repository. It is about a branch, not about who wrote it.
142196 type MergeRequest struct {
@@ -326,13 +380,32 @@ type Comment struct {
326380 // When it differs from the current head the line may have moved; clients
327381 // may show the comment as outdated.
328382 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.
331387 Text string `protobuf:"bytes,7,opt,name=text,proto3" json:"text,omitempty"`
332388 // Resolved is true once the comment was marked resolved.
333389 Resolved bool `protobuf:"varint,8,opt,name=resolved,proto3" json:"resolved,omitempty"`
334390 // 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"`
336409 unknownFields protoimpl.UnknownFields
337410 sizeCache protoimpl.SizeCache
338411 }
@@ -430,6 +503,134 @@ func (x *Comment) GetCreatedAt() *timestamppb.Timestamp {
430503 return nil
431504 }
432505
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+
433634 // CreateMergeRequestRequest describes the merge request to open.
434635 type CreateMergeRequestRequest struct {
435636 state protoimpl.MessageState `protogen:"open.v1"`
@@ -452,7 +653,7 @@ type CreateMergeRequestRequest struct {
452653
453654 func (x *CreateMergeRequestRequest) Reset() {
454655 *x = CreateMergeRequestRequest{}
455- mi := &file_ermite_merge_request_proto_msgTypes[2]
656+ mi := &file_ermite_merge_request_proto_msgTypes[3]
456657 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
457658 ms.StoreMessageInfo(mi)
458659 }
@@ -464,7 +665,7 @@ func (x *CreateMergeRequestRequest) String() string {
464665 func (*CreateMergeRequestRequest) ProtoMessage() {}
465666
466667 func (x *CreateMergeRequestRequest) ProtoReflect() protoreflect.Message {
467- mi := &file_ermite_merge_request_proto_msgTypes[2]
668+ mi := &file_ermite_merge_request_proto_msgTypes[3]
468669 if x != nil {
469670 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
470671 if ms.LoadMessageInfo() == nil {
@@ -477,7 +678,7 @@ func (x *CreateMergeRequestRequest) ProtoReflect() protoreflect.Message {
477678
478679 // Deprecated: Use CreateMergeRequestRequest.ProtoReflect.Descriptor instead.
479680 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}
481682 }
482683
483684 func (x *CreateMergeRequestRequest) GetRepo() string {
@@ -526,7 +727,7 @@ type CreateMergeRequestResponse struct {
526727
527728 func (x *CreateMergeRequestResponse) Reset() {
528729 *x = CreateMergeRequestResponse{}
529- mi := &file_ermite_merge_request_proto_msgTypes[3]
730+ mi := &file_ermite_merge_request_proto_msgTypes[4]
530731 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
531732 ms.StoreMessageInfo(mi)
532733 }
@@ -538,7 +739,7 @@ func (x *CreateMergeRequestResponse) String() string {
538739 func (*CreateMergeRequestResponse) ProtoMessage() {}
539740
540741 func (x *CreateMergeRequestResponse) ProtoReflect() protoreflect.Message {
541- mi := &file_ermite_merge_request_proto_msgTypes[3]
742+ mi := &file_ermite_merge_request_proto_msgTypes[4]
542743 if x != nil {
543744 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
544745 if ms.LoadMessageInfo() == nil {
@@ -551,7 +752,7 @@ func (x *CreateMergeRequestResponse) ProtoReflect() protoreflect.Message {
551752
552753 // Deprecated: Use CreateMergeRequestResponse.ProtoReflect.Descriptor instead.
553754 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}
555756 }
556757
557758 func (x *CreateMergeRequestResponse) GetMergeRequest() *MergeRequest {
@@ -581,7 +782,7 @@ type ListMergeRequestsRequest struct {
581782
582783 func (x *ListMergeRequestsRequest) Reset() {
583784 *x = ListMergeRequestsRequest{}
584- mi := &file_ermite_merge_request_proto_msgTypes[4]
785+ mi := &file_ermite_merge_request_proto_msgTypes[5]
585786 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
586787 ms.StoreMessageInfo(mi)
587788 }
@@ -593,7 +794,7 @@ func (x *ListMergeRequestsRequest) String() string {
593794 func (*ListMergeRequestsRequest) ProtoMessage() {}
594795
595796 func (x *ListMergeRequestsRequest) ProtoReflect() protoreflect.Message {
596- mi := &file_ermite_merge_request_proto_msgTypes[4]
797+ mi := &file_ermite_merge_request_proto_msgTypes[5]
597798 if x != nil {
598799 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
599800 if ms.LoadMessageInfo() == nil {
@@ -606,7 +807,7 @@ func (x *ListMergeRequestsRequest) ProtoReflect() protoreflect.Message {
606807
607808 // Deprecated: Use ListMergeRequestsRequest.ProtoReflect.Descriptor instead.
608809 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}
610811 }
611812
612813 func (x *ListMergeRequestsRequest) GetRepo() string {
@@ -651,7 +852,7 @@ type ListMergeRequestsResponse struct {
651852
652853 func (x *ListMergeRequestsResponse) Reset() {
653854 *x = ListMergeRequestsResponse{}
654- mi := &file_ermite_merge_request_proto_msgTypes[5]
855+ mi := &file_ermite_merge_request_proto_msgTypes[6]
655856 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
656857 ms.StoreMessageInfo(mi)
657858 }
@@ -663,7 +864,7 @@ func (x *ListMergeRequestsResponse) String() string {
663864 func (*ListMergeRequestsResponse) ProtoMessage() {}
664865
665866 func (x *ListMergeRequestsResponse) ProtoReflect() protoreflect.Message {
666- mi := &file_ermite_merge_request_proto_msgTypes[5]
867+ mi := &file_ermite_merge_request_proto_msgTypes[6]
667868 if x != nil {
668869 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
669870 if ms.LoadMessageInfo() == nil {
@@ -676,7 +877,7 @@ func (x *ListMergeRequestsResponse) ProtoReflect() protoreflect.Message {
676877
677878 // Deprecated: Use ListMergeRequestsResponse.ProtoReflect.Descriptor instead.
678879 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}
680881 }
681882
682883 func (x *ListMergeRequestsResponse) GetMergeRequests() []*MergeRequest {
@@ -713,7 +914,7 @@ type GetMergeRequestRequest struct {
713914
714915 func (x *GetMergeRequestRequest) Reset() {
715916 *x = GetMergeRequestRequest{}
716- mi := &file_ermite_merge_request_proto_msgTypes[6]
917+ mi := &file_ermite_merge_request_proto_msgTypes[7]
717918 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
718919 ms.StoreMessageInfo(mi)
719920 }
@@ -725,7 +926,7 @@ func (x *GetMergeRequestRequest) String() string {
725926 func (*GetMergeRequestRequest) ProtoMessage() {}
726927
727928 func (x *GetMergeRequestRequest) ProtoReflect() protoreflect.Message {
728- mi := &file_ermite_merge_request_proto_msgTypes[6]
929+ mi := &file_ermite_merge_request_proto_msgTypes[7]
729930 if x != nil {
730931 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
731932 if ms.LoadMessageInfo() == nil {
@@ -738,7 +939,7 @@ func (x *GetMergeRequestRequest) ProtoReflect() protoreflect.Message {
738939
739940 // Deprecated: Use GetMergeRequestRequest.ProtoReflect.Descriptor instead.
740941 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}
742943 }
743944
744945 func (x *GetMergeRequestRequest) GetRepo() string {
@@ -794,14 +995,17 @@ type GetMergeRequestResponse struct {
794995 // but that commit no longer exists in the repository: the diff is then the
795996 // diff against the target. A client should tell the reader to review the
796997 // 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"`
7981002 unknownFields protoimpl.UnknownFields
7991003 sizeCache protoimpl.SizeCache
8001004 }
8011005
8021006 func (x *GetMergeRequestResponse) Reset() {
8031007 *x = GetMergeRequestResponse{}
804- mi := &file_ermite_merge_request_proto_msgTypes[7]
1008+ mi := &file_ermite_merge_request_proto_msgTypes[8]
8051009 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
8061010 ms.StoreMessageInfo(mi)
8071011 }
@@ -813,7 +1017,7 @@ func (x *GetMergeRequestResponse) String() string {
8131017 func (*GetMergeRequestResponse) ProtoMessage() {}
8141018
8151019 func (x *GetMergeRequestResponse) ProtoReflect() protoreflect.Message {
816- mi := &file_ermite_merge_request_proto_msgTypes[7]
1020+ mi := &file_ermite_merge_request_proto_msgTypes[8]
8171021 if x != nil {
8181022 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
8191023 if ms.LoadMessageInfo() == nil {
@@ -826,7 +1030,7 @@ func (x *GetMergeRequestResponse) ProtoReflect() protoreflect.Message {
8261030
8271031 // Deprecated: Use GetMergeRequestResponse.ProtoReflect.Descriptor instead.
8281032 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}
8301034 }
8311035
8321036 func (x *GetMergeRequestResponse) GetMergeRequest() *MergeRequest {
@@ -892,6 +1096,13 @@ func (x *GetMergeRequestResponse) GetLastReadLost() bool {
8921096 return false
8931097 }
8941098
1099+func (x *GetMergeRequestResponse) GetVerdicts() []*AuthorVerdict {
1100+ if x != nil {
1101+ return x.Verdicts
1102+ }
1103+ return nil
1104+}
1105+
8951106 // AddCommentRequest describes the comment to add.
8961107 type AddCommentRequest struct {
8971108 state protoimpl.MessageState `protogen:"open.v1"`
@@ -909,15 +1120,26 @@ type AddCommentRequest struct {
9091120 Line int32 `protobuf:"varint,4,opt,name=line,proto3" json:"line,omitempty"`
9101121 // Side is the side line counts on. Required when path is set.
9111122 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"`
9141136 unknownFields protoimpl.UnknownFields
9151137 sizeCache protoimpl.SizeCache
9161138 }
9171139
9181140 func (x *AddCommentRequest) Reset() {
9191141 *x = AddCommentRequest{}
920- mi := &file_ermite_merge_request_proto_msgTypes[8]
1142+ mi := &file_ermite_merge_request_proto_msgTypes[9]
9211143 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
9221144 ms.StoreMessageInfo(mi)
9231145 }
@@ -929,7 +1151,7 @@ func (x *AddCommentRequest) String() string {
9291151 func (*AddCommentRequest) ProtoMessage() {}
9301152
9311153 func (x *AddCommentRequest) ProtoReflect() protoreflect.Message {
932- mi := &file_ermite_merge_request_proto_msgTypes[8]
1154+ mi := &file_ermite_merge_request_proto_msgTypes[9]
9331155 if x != nil {
9341156 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
9351157 if ms.LoadMessageInfo() == nil {
@@ -942,7 +1164,7 @@ func (x *AddCommentRequest) ProtoReflect() protoreflect.Message {
9421164
9431165 // Deprecated: Use AddCommentRequest.ProtoReflect.Descriptor instead.
9441166 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}
9461168 }
9471169
9481170 func (x *AddCommentRequest) GetRepo() string {
@@ -987,6 +1209,27 @@ func (x *AddCommentRequest) GetText() string {
9871209 return ""
9881210 }
9891211
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+
9901233 // AddCommentResponse holds the new comment.
9911234 type AddCommentResponse struct {
9921235 state protoimpl.MessageState `protogen:"open.v1"`
@@ -998,7 +1241,7 @@ type AddCommentResponse struct {
9981241
9991242 func (x *AddCommentResponse) Reset() {
10001243 *x = AddCommentResponse{}
1001- mi := &file_ermite_merge_request_proto_msgTypes[9]
1244+ mi := &file_ermite_merge_request_proto_msgTypes[10]
10021245 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
10031246 ms.StoreMessageInfo(mi)
10041247 }
@@ -1010,7 +1253,7 @@ func (x *AddCommentResponse) String() string {
10101253 func (*AddCommentResponse) ProtoMessage() {}
10111254
10121255 func (x *AddCommentResponse) ProtoReflect() protoreflect.Message {
1013- mi := &file_ermite_merge_request_proto_msgTypes[9]
1256+ mi := &file_ermite_merge_request_proto_msgTypes[10]
10141257 if x != nil {
10151258 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
10161259 if ms.LoadMessageInfo() == nil {
@@ -1023,7 +1266,7 @@ func (x *AddCommentResponse) ProtoReflect() protoreflect.Message {
10231266
10241267 // Deprecated: Use AddCommentResponse.ProtoReflect.Descriptor instead.
10251268 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}
10271270 }
10281271
10291272 func (x *AddCommentResponse) GetComment() *Comment {
@@ -1033,6 +1276,236 @@ func (x *AddCommentResponse) GetComment() *Comment {
10331276 return nil
10341277 }
10351278
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+
10361509 // ResolveCommentRequest changes the resolved state of a comment.
10371510 type ResolveCommentRequest struct {
10381511 state protoimpl.MessageState `protogen:"open.v1"`
@@ -1050,7 +1523,7 @@ type ResolveCommentRequest struct {
10501523
10511524 func (x *ResolveCommentRequest) Reset() {
10521525 *x = ResolveCommentRequest{}
1053- mi := &file_ermite_merge_request_proto_msgTypes[10]
1526+ mi := &file_ermite_merge_request_proto_msgTypes[15]
10541527 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
10551528 ms.StoreMessageInfo(mi)
10561529 }
@@ -1062,7 +1535,7 @@ func (x *ResolveCommentRequest) String() string {
10621535 func (*ResolveCommentRequest) ProtoMessage() {}
10631536
10641537 func (x *ResolveCommentRequest) ProtoReflect() protoreflect.Message {
1065- mi := &file_ermite_merge_request_proto_msgTypes[10]
1538+ mi := &file_ermite_merge_request_proto_msgTypes[15]
10661539 if x != nil {
10671540 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
10681541 if ms.LoadMessageInfo() == nil {
@@ -1075,7 +1548,7 @@ func (x *ResolveCommentRequest) ProtoReflect() protoreflect.Message {
10751548
10761549 // Deprecated: Use ResolveCommentRequest.ProtoReflect.Descriptor instead.
10771550 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}
10791552 }
10801553
10811554 func (x *ResolveCommentRequest) GetRepo() string {
@@ -1117,7 +1590,7 @@ type ResolveCommentResponse struct {
11171590
11181591 func (x *ResolveCommentResponse) Reset() {
11191592 *x = ResolveCommentResponse{}
1120- mi := &file_ermite_merge_request_proto_msgTypes[11]
1593+ mi := &file_ermite_merge_request_proto_msgTypes[16]
11211594 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
11221595 ms.StoreMessageInfo(mi)
11231596 }
@@ -1129,7 +1602,7 @@ func (x *ResolveCommentResponse) String() string {
11291602 func (*ResolveCommentResponse) ProtoMessage() {}
11301603
11311604 func (x *ResolveCommentResponse) ProtoReflect() protoreflect.Message {
1132- mi := &file_ermite_merge_request_proto_msgTypes[11]
1605+ mi := &file_ermite_merge_request_proto_msgTypes[16]
11331606 if x != nil {
11341607 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
11351608 if ms.LoadMessageInfo() == nil {
@@ -1142,7 +1615,7 @@ func (x *ResolveCommentResponse) ProtoReflect() protoreflect.Message {
11421615
11431616 // Deprecated: Use ResolveCommentResponse.ProtoReflect.Descriptor instead.
11441617 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}
11461619 }
11471620
11481621 func (x *ResolveCommentResponse) GetComment() *Comment {
@@ -1165,7 +1638,7 @@ type CloseMergeRequestRequest struct {
11651638
11661639 func (x *CloseMergeRequestRequest) Reset() {
11671640 *x = CloseMergeRequestRequest{}
1168- mi := &file_ermite_merge_request_proto_msgTypes[12]
1641+ mi := &file_ermite_merge_request_proto_msgTypes[17]
11691642 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
11701643 ms.StoreMessageInfo(mi)
11711644 }
@@ -1177,7 +1650,7 @@ func (x *CloseMergeRequestRequest) String() string {
11771650 func (*CloseMergeRequestRequest) ProtoMessage() {}
11781651
11791652 func (x *CloseMergeRequestRequest) ProtoReflect() protoreflect.Message {
1180- mi := &file_ermite_merge_request_proto_msgTypes[12]
1653+ mi := &file_ermite_merge_request_proto_msgTypes[17]
11811654 if x != nil {
11821655 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
11831656 if ms.LoadMessageInfo() == nil {
@@ -1190,7 +1663,7 @@ func (x *CloseMergeRequestRequest) ProtoReflect() protoreflect.Message {
11901663
11911664 // Deprecated: Use CloseMergeRequestRequest.ProtoReflect.Descriptor instead.
11921665 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}
11941667 }
11951668
11961669 func (x *CloseMergeRequestRequest) GetRepo() string {
@@ -1218,7 +1691,7 @@ type CloseMergeRequestResponse struct {
12181691
12191692 func (x *CloseMergeRequestResponse) Reset() {
12201693 *x = CloseMergeRequestResponse{}
1221- mi := &file_ermite_merge_request_proto_msgTypes[13]
1694+ mi := &file_ermite_merge_request_proto_msgTypes[18]
12221695 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
12231696 ms.StoreMessageInfo(mi)
12241697 }
@@ -1230,7 +1703,7 @@ func (x *CloseMergeRequestResponse) String() string {
12301703 func (*CloseMergeRequestResponse) ProtoMessage() {}
12311704
12321705 func (x *CloseMergeRequestResponse) ProtoReflect() protoreflect.Message {
1233- mi := &file_ermite_merge_request_proto_msgTypes[13]
1706+ mi := &file_ermite_merge_request_proto_msgTypes[18]
12341707 if x != nil {
12351708 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
12361709 if ms.LoadMessageInfo() == nil {
@@ -1243,7 +1716,7 @@ func (x *CloseMergeRequestResponse) ProtoReflect() protoreflect.Message {
12431716
12441717 // Deprecated: Use CloseMergeRequestResponse.ProtoReflect.Descriptor instead.
12451718 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}
12471720 }
12481721
12491722 func (x *CloseMergeRequestResponse) GetMergeRequest() *MergeRequest {
@@ -1279,7 +1752,7 @@ type MergeMergeRequestRequest struct {
12791752
12801753 func (x *MergeMergeRequestRequest) Reset() {
12811754 *x = MergeMergeRequestRequest{}
1282- mi := &file_ermite_merge_request_proto_msgTypes[14]
1755+ mi := &file_ermite_merge_request_proto_msgTypes[19]
12831756 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
12841757 ms.StoreMessageInfo(mi)
12851758 }
@@ -1291,7 +1764,7 @@ func (x *MergeMergeRequestRequest) String() string {
12911764 func (*MergeMergeRequestRequest) ProtoMessage() {}
12921765
12931766 func (x *MergeMergeRequestRequest) ProtoReflect() protoreflect.Message {
1294- mi := &file_ermite_merge_request_proto_msgTypes[14]
1767+ mi := &file_ermite_merge_request_proto_msgTypes[19]
12951768 if x != nil {
12961769 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
12971770 if ms.LoadMessageInfo() == nil {
@@ -1304,7 +1777,7 @@ func (x *MergeMergeRequestRequest) ProtoReflect() protoreflect.Message {
13041777
13051778 // Deprecated: Use MergeMergeRequestRequest.ProtoReflect.Descriptor instead.
13061779 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}
13081781 }
13091782
13101783 func (x *MergeMergeRequestRequest) GetRepo() string {
@@ -1359,7 +1832,7 @@ type MergeMergeRequestResponse struct {
13591832
13601833 func (x *MergeMergeRequestResponse) Reset() {
13611834 *x = MergeMergeRequestResponse{}
1362- mi := &file_ermite_merge_request_proto_msgTypes[15]
1835+ mi := &file_ermite_merge_request_proto_msgTypes[20]
13631836 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
13641837 ms.StoreMessageInfo(mi)
13651838 }
@@ -1371,7 +1844,7 @@ func (x *MergeMergeRequestResponse) String() string {
13711844 func (*MergeMergeRequestResponse) ProtoMessage() {}
13721845
13731846 func (x *MergeMergeRequestResponse) ProtoReflect() protoreflect.Message {
1374- mi := &file_ermite_merge_request_proto_msgTypes[15]
1847+ mi := &file_ermite_merge_request_proto_msgTypes[20]
13751848 if x != nil {
13761849 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
13771850 if ms.LoadMessageInfo() == nil {
@@ -1384,7 +1857,7 @@ func (x *MergeMergeRequestResponse) ProtoReflect() protoreflect.Message {
13841857
13851858 // Deprecated: Use MergeMergeRequestResponse.ProtoReflect.Descriptor instead.
13861859 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}
13881861 }
13891862
13901863 func (x *MergeMergeRequestResponse) GetMergeRequest() *MergeRequest {
@@ -1418,7 +1891,7 @@ type MarkReadRequest struct {
14181891
14191892 func (x *MarkReadRequest) Reset() {
14201893 *x = MarkReadRequest{}
1421- mi := &file_ermite_merge_request_proto_msgTypes[16]
1894+ mi := &file_ermite_merge_request_proto_msgTypes[21]
14221895 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
14231896 ms.StoreMessageInfo(mi)
14241897 }
@@ -1430,7 +1903,7 @@ func (x *MarkReadRequest) String() string {
14301903 func (*MarkReadRequest) ProtoMessage() {}
14311904
14321905 func (x *MarkReadRequest) ProtoReflect() protoreflect.Message {
1433- mi := &file_ermite_merge_request_proto_msgTypes[16]
1906+ mi := &file_ermite_merge_request_proto_msgTypes[21]
14341907 if x != nil {
14351908 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
14361909 if ms.LoadMessageInfo() == nil {
@@ -1443,7 +1916,7 @@ func (x *MarkReadRequest) ProtoReflect() protoreflect.Message {
14431916
14441917 // Deprecated: Use MarkReadRequest.ProtoReflect.Descriptor instead.
14451918 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}
14471920 }
14481921
14491922 func (x *MarkReadRequest) GetRepo() string {
@@ -1476,7 +1949,7 @@ type MarkReadResponse struct {
14761949
14771950 func (x *MarkReadResponse) Reset() {
14781951 *x = MarkReadResponse{}
1479- mi := &file_ermite_merge_request_proto_msgTypes[17]
1952+ mi := &file_ermite_merge_request_proto_msgTypes[22]
14801953 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
14811954 ms.StoreMessageInfo(mi)
14821955 }
@@ -1488,7 +1961,7 @@ func (x *MarkReadResponse) String() string {
14881961 func (*MarkReadResponse) ProtoMessage() {}
14891962
14901963 func (x *MarkReadResponse) ProtoReflect() protoreflect.Message {
1491- mi := &file_ermite_merge_request_proto_msgTypes[17]
1964+ mi := &file_ermite_merge_request_proto_msgTypes[22]
14921965 if x != nil {
14931966 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
14941967 if ms.LoadMessageInfo() == nil {
@@ -1501,7 +1974,7 @@ func (x *MarkReadResponse) ProtoReflect() protoreflect.Message {
15011974
15021975 // Deprecated: Use MarkReadResponse.ProtoReflect.Descriptor instead.
15031976 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}
15051978 }
15061979
15071980 var File_ermite_merge_request_proto protoreflect.FileDescriptor
@@ -1526,7 +1999,7 @@ const file_ermite_merge_request_proto_rawDesc = "" +
15261999 "\ahead_id\x18\v \x01(\tR\x06headId\x12(\n" +
15272000 "\x10merged_commit_id\x18\f \x01(\tR\x0emergedCommitId\x120\n" +
15282001 "\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" +
15302003 "\aComment\x12\x0e\n" +
15312004 "\x02id\x18\x01 \x01(\tR\x02id\x12\x16\n" +
15322005 "\x06author\x18\x02 \x01(\tR\x06author\x12\x12\n" +
@@ -1537,7 +2010,23 @@ const file_ermite_merge_request_proto_rawDesc = "" +
15372010 "\x04text\x18\a \x01(\tR\x04text\x12\x1a\n" +
15382011 "\bresolved\x18\b \x01(\bR\bresolved\x129\n" +
15392012 "\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" +
15412030 "\x19CreateMergeRequestRequest\x12\x12\n" +
15422031 "\x04repo\x18\x01 \x01(\tR\x04repo\x12\x14\n" +
15432032 "\x05title\x18\x02 \x01(\tR\x05title\x12 \n" +
@@ -1558,7 +2047,7 @@ const file_ermite_merge_request_proto_rawDesc = "" +
15582047 "\x16GetMergeRequestRequest\x12\x12\n" +
15592048 "\x04repo\x18\x01 \x01(\tR\x04repo\x12\x16\n" +
15602049 "\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" +
15622051 "\x17GetMergeRequestResponse\x129\n" +
15632052 "\rmerge_request\x18\x01 \x01(\v2\x14.ermite.MergeRequestR\fmergeRequest\x12(\n" +
15642053 "\acommits\x18\x02 \x03(\v2\x0e.ermite.CommitR\acommits\x12+\n" +
@@ -1570,15 +2059,36 @@ const file_ermite_merge_request_proto_rawDesc = "" +
15702059 "\bcomments\x18\a \x03(\v2\x0f.ermite.CommentR\bcomments\x12 \n" +
15712060 "\flast_read_id\x18\b \x01(\tR\n" +
15722061 "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" +
15742065 "\x11AddCommentRequest\x12\x12\n" +
15752066 "\x04repo\x18\x01 \x01(\tR\x04repo\x12\x16\n" +
15762067 "\x06number\x18\x02 \x01(\x03R\x06number\x12\x12\n" +
15772068 "\x04path\x18\x03 \x01(\tR\x04path\x12\x12\n" +
15782069 "\x04line\x18\x04 \x01(\x05R\x04line\x12$\n" +
15792070 "\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" +
15812076 "\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" +
15822092 "\acomment\x18\x01 \x01(\v2\x0f.ermite.CommentR\acomment\"~\n" +
15832093 "\x15ResolveCommentRequest\x12\x12\n" +
15842094 "\x04repo\x18\x01 \x01(\tR\x04repo\x12\x16\n" +
@@ -1615,13 +2125,19 @@ const file_ermite_merge_request_proto_rawDesc = "" +
16152125 "\bDiffSide\x12\x19\n" +
16162126 "\x15DIFF_SIDE_UNSPECIFIED\x10\x00\x12\x11\n" +
16172127 "\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" +
16192133 "\x13MergeRequestService\x12[\n" +
16202134 "\x12CreateMergeRequest\x12!.ermite.CreateMergeRequestRequest\x1a\".ermite.CreateMergeRequestResponse\x12X\n" +
16212135 "\x11ListMergeRequests\x12 .ermite.ListMergeRequestsRequest\x1a!.ermite.ListMergeRequestsResponse\x12R\n" +
16222136 "\x0fGetMergeRequest\x12\x1e.ermite.GetMergeRequestRequest\x1a\x1f.ermite.GetMergeRequestResponse\x12C\n" +
16232137 "\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" +
16252141 "\x0eResolveComment\x12\x1d.ermite.ResolveCommentRequest\x1a\x1e.ermite.ResolveCommentResponse\x12X\n" +
16262142 "\x11CloseMergeRequest\x12 .ermite.CloseMergeRequestRequest\x1a!.ermite.CloseMergeRequestResponse\x12X\n" +
16272143 "\x11MergeMergeRequest\x12 .ermite.MergeMergeRequestRequest\x1a!.ermite.MergeMergeRequestResponse\x12=\n" +
@@ -1641,77 +2157,95 @@ func file_ermite_merge_request_proto_rawDescGZIP() []byte {
16412157 return file_ermite_merge_request_proto_rawDescData
16422158 }
16432159
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)
16462162 var file_ermite_merge_request_proto_goTypes = []any{
16472163 (MergeRequestState)(0), // 0: ermite.MergeRequestState
16482164 (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
16722194 }
16732195 var file_ermite_merge_request_proto_depIdxs = []int32{
16742196 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
16782200 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
17152249 }
17162250
17172251 func init() { file_ermite_merge_request_proto_init() }
@@ -1726,8 +2260,8 @@ func file_ermite_merge_request_proto_init() {
17262260 File: protoimpl.DescBuilder{
17272261 GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
17282262 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,
17312265 NumExtensions: 0,
17322266 NumServices: 1,
17332267 },
@@ -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 branch194 // 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; clients380 // 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 it383+ // 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.UnknownFields409 unknownFields protoimpl.UnknownFields
337 sizeCache protoimpl.SizeCache410 sizeCache protoimpl.SizeCache
338 }411 }
@@ -430,6 +503,134 @@ func (x *Comment) GetCreatedAt() *timestamppb.Timestamp {
430 return nil503 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 the995 // 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 the996 // 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.UnknownFields1002 unknownFields protoimpl.UnknownFields
799 sizeCache protoimpl.SizeCache1003 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 false1096 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.UnknownFields1136 unknownFields protoimpl.UnknownFields
915 sizeCache protoimpl.SizeCache1137 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 nil1276 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.FileDescriptor1980 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_rawDescData2157 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.MergeRequestState2163 (MergeRequestState)(0), // 0: ermite.MergeRequestState
1648 (DiffSide)(0), // 1: ermite.DiffSide2164 (DiffSide)(0), // 1: ermite.DiffSide
1649- (*MergeRequest)(nil), // 2: ermite.MergeRequest2165+ (Verdict)(0), // 2: ermite.Verdict
1650- (*Comment)(nil), // 3: ermite.Comment2166+ (*MergeRequest)(nil), // 3: ermite.MergeRequest
1651- (*CreateMergeRequestRequest)(nil), // 4: ermite.CreateMergeRequestRequest2167+ (*Comment)(nil), // 4: ermite.Comment
1652- (*CreateMergeRequestResponse)(nil), // 5: ermite.CreateMergeRequestResponse2168+ (*AuthorVerdict)(nil), // 5: ermite.AuthorVerdict
1653- (*ListMergeRequestsRequest)(nil), // 6: ermite.ListMergeRequestsRequest2169+ (*CreateMergeRequestRequest)(nil), // 6: ermite.CreateMergeRequestRequest
1654- (*ListMergeRequestsResponse)(nil), // 7: ermite.ListMergeRequestsResponse2170+ (*CreateMergeRequestResponse)(nil), // 7: ermite.CreateMergeRequestResponse
1655- (*GetMergeRequestRequest)(nil), // 8: ermite.GetMergeRequestRequest2171+ (*ListMergeRequestsRequest)(nil), // 8: ermite.ListMergeRequestsRequest
1656- (*GetMergeRequestResponse)(nil), // 9: ermite.GetMergeRequestResponse2172+ (*ListMergeRequestsResponse)(nil), // 9: ermite.ListMergeRequestsResponse
1657- (*AddCommentRequest)(nil), // 10: ermite.AddCommentRequest2173+ (*GetMergeRequestRequest)(nil), // 10: ermite.GetMergeRequestRequest
1658- (*AddCommentResponse)(nil), // 11: ermite.AddCommentResponse2174+ (*GetMergeRequestResponse)(nil), // 11: ermite.GetMergeRequestResponse
1659- (*ResolveCommentRequest)(nil), // 12: ermite.ResolveCommentRequest2175+ (*AddCommentRequest)(nil), // 12: ermite.AddCommentRequest
1660- (*ResolveCommentResponse)(nil), // 13: ermite.ResolveCommentResponse2176+ (*AddCommentResponse)(nil), // 13: ermite.AddCommentResponse
1661- (*CloseMergeRequestRequest)(nil), // 14: ermite.CloseMergeRequestRequest2177+ (*EditCommentRequest)(nil), // 14: ermite.EditCommentRequest
1662- (*CloseMergeRequestResponse)(nil), // 15: ermite.CloseMergeRequestResponse2178+ (*EditCommentResponse)(nil), // 15: ermite.EditCommentResponse
1663- (*MergeMergeRequestRequest)(nil), // 16: ermite.MergeMergeRequestRequest2179+ (*DeleteCommentRequest)(nil), // 16: ermite.DeleteCommentRequest
1664- (*MergeMergeRequestResponse)(nil), // 17: ermite.MergeMergeRequestResponse2180+ (*DeleteCommentResponse)(nil), // 17: ermite.DeleteCommentResponse
1665- (*MarkReadRequest)(nil), // 18: ermite.MarkReadRequest2181+ (*ResolveCommentRequest)(nil), // 18: ermite.ResolveCommentRequest
1666- (*MarkReadResponse)(nil), // 19: ermite.MarkReadResponse2182+ (*ResolveCommentResponse)(nil), // 19: ermite.ResolveCommentResponse
1667- (*timestamppb.Timestamp)(nil), // 20: google.protobuf.Timestamp2183+ (*CloseMergeRequestRequest)(nil), // 20: ermite.CloseMergeRequestRequest
1668- (MergeMode)(0), // 21: ermite.MergeMode2184+ (*CloseMergeRequestResponse)(nil), // 21: ermite.CloseMergeRequestResponse
1669- (*Commit)(nil), // 22: ermite.Commit2185+ (*MergeMergeRequestRequest)(nil), // 22: ermite.MergeMergeRequestRequest
1670- (*DiffStats)(nil), // 23: ermite.DiffStats2186+ (*MergeMergeRequestResponse)(nil), // 23: ermite.MergeMergeRequestResponse
1671- (*Diff)(nil), // 24: ermite.Diff2187+ (*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.MergeRequestState2196 0, // 0: ermite.MergeRequest.state:type_name -> ermite.MergeRequestState
1675- 20, // 1: ermite.MergeRequest.created_at:type_name -> google.protobuf.Timestamp2197+ 26, // 1: ermite.MergeRequest.created_at:type_name -> google.protobuf.Timestamp
1676- 20, // 2: ermite.MergeRequest.updated_at:type_name -> google.protobuf.Timestamp2198+ 26, // 2: ermite.MergeRequest.updated_at:type_name -> google.protobuf.Timestamp
1677- 21, // 3: ermite.MergeRequest.merge_mode:type_name -> ermite.MergeMode2199+ 27, // 3: ermite.MergeRequest.merge_mode:type_name -> ermite.MergeMode
1678 1, // 4: ermite.Comment.side:type_name -> ermite.DiffSide2200 1, // 4: ermite.Comment.side:type_name -> ermite.DiffSide
1679- 20, // 5: ermite.Comment.created_at:type_name -> google.protobuf.Timestamp2201+ 26, // 5: ermite.Comment.created_at:type_name -> google.protobuf.Timestamp
1680- 2, // 6: ermite.CreateMergeRequestResponse.merge_request:type_name -> ermite.MergeRequest2202+ 2, // 6: ermite.Comment.verdict:type_name -> ermite.Verdict
1681- 0, // 7: ermite.ListMergeRequestsRequest.state:type_name -> ermite.MergeRequestState2203+ 26, // 7: ermite.Comment.edited_at:type_name -> google.protobuf.Timestamp
1682- 2, // 8: ermite.ListMergeRequestsResponse.merge_requests:type_name -> ermite.MergeRequest2204+ 2, // 8: ermite.AuthorVerdict.verdict:type_name -> ermite.Verdict
1683- 2, // 9: ermite.GetMergeRequestResponse.merge_request:type_name -> ermite.MergeRequest2205+ 26, // 9: ermite.AuthorVerdict.created_at:type_name -> google.protobuf.Timestamp
1684- 22, // 10: ermite.GetMergeRequestResponse.commits:type_name -> ermite.Commit2206+ 3, // 10: ermite.CreateMergeRequestResponse.merge_request:type_name -> ermite.MergeRequest
1685- 23, // 11: ermite.GetMergeRequestResponse.stats:type_name -> ermite.DiffStats2207+ 0, // 11: ermite.ListMergeRequestsRequest.state:type_name -> ermite.MergeRequestState
1686- 24, // 12: ermite.GetMergeRequestResponse.diff:type_name -> ermite.Diff2208+ 3, // 12: ermite.ListMergeRequestsResponse.merge_requests:type_name -> ermite.MergeRequest
1687- 3, // 13: ermite.GetMergeRequestResponse.comments:type_name -> ermite.Comment2209+ 3, // 13: ermite.GetMergeRequestResponse.merge_request:type_name -> ermite.MergeRequest
1688- 1, // 14: ermite.AddCommentRequest.side:type_name -> ermite.DiffSide2210+ 28, // 14: ermite.GetMergeRequestResponse.commits:type_name -> ermite.Commit
1689- 3, // 15: ermite.AddCommentResponse.comment:type_name -> ermite.Comment2211+ 29, // 15: ermite.GetMergeRequestResponse.stats:type_name -> ermite.DiffStats
1690- 3, // 16: ermite.ResolveCommentResponse.comment:type_name -> ermite.Comment2212+ 30, // 16: ermite.GetMergeRequestResponse.diff:type_name -> ermite.Diff
1691- 2, // 17: ermite.CloseMergeRequestResponse.merge_request:type_name -> ermite.MergeRequest2213+ 4, // 17: ermite.GetMergeRequestResponse.comments:type_name -> ermite.Comment
1692- 21, // 18: ermite.MergeMergeRequestRequest.mode:type_name -> ermite.MergeMode2214+ 5, // 18: ermite.GetMergeRequestResponse.verdicts:type_name -> ermite.AuthorVerdict
1693- 2, // 19: ermite.MergeMergeRequestResponse.merge_request:type_name -> ermite.MergeRequest2215+ 1, // 19: ermite.AddCommentRequest.side:type_name -> ermite.DiffSide
1694- 4, // 20: ermite.MergeRequestService.CreateMergeRequest:input_type -> ermite.CreateMergeRequestRequest2216+ 2, // 20: ermite.AddCommentRequest.verdict:type_name -> ermite.Verdict
1695- 6, // 21: ermite.MergeRequestService.ListMergeRequests:input_type -> ermite.ListMergeRequestsRequest2217+ 4, // 21: ermite.AddCommentResponse.comment:type_name -> ermite.Comment
1696- 8, // 22: ermite.MergeRequestService.GetMergeRequest:input_type -> ermite.GetMergeRequestRequest2218+ 4, // 22: ermite.EditCommentResponse.comment:type_name -> ermite.Comment
1697- 10, // 23: ermite.MergeRequestService.AddComment:input_type -> ermite.AddCommentRequest2219+ 4, // 23: ermite.DeleteCommentResponse.comment:type_name -> ermite.Comment
1698- 12, // 24: ermite.MergeRequestService.ResolveComment:input_type -> ermite.ResolveCommentRequest2220+ 4, // 24: ermite.ResolveCommentResponse.comment:type_name -> ermite.Comment
1699- 14, // 25: ermite.MergeRequestService.CloseMergeRequest:input_type -> ermite.CloseMergeRequestRequest2221+ 3, // 25: ermite.CloseMergeRequestResponse.merge_request:type_name -> ermite.MergeRequest
1700- 16, // 26: ermite.MergeRequestService.MergeMergeRequest:input_type -> ermite.MergeMergeRequestRequest2222+ 27, // 26: ermite.MergeMergeRequestRequest.mode:type_name -> ermite.MergeMode
1701- 18, // 27: ermite.MergeRequestService.MarkRead:input_type -> ermite.MarkReadRequest2223+ 3, // 27: ermite.MergeMergeRequestResponse.merge_request:type_name -> ermite.MergeRequest
1702- 5, // 28: ermite.MergeRequestService.CreateMergeRequest:output_type -> ermite.CreateMergeRequestResponse2224+ 6, // 28: ermite.MergeRequestService.CreateMergeRequest:input_type -> ermite.CreateMergeRequestRequest
1703- 7, // 29: ermite.MergeRequestService.ListMergeRequests:output_type -> ermite.ListMergeRequestsResponse2225+ 8, // 29: ermite.MergeRequestService.ListMergeRequests:input_type -> ermite.ListMergeRequestsRequest
1704- 9, // 30: ermite.MergeRequestService.GetMergeRequest:output_type -> ermite.GetMergeRequestResponse2226+ 10, // 30: ermite.MergeRequestService.GetMergeRequest:input_type -> ermite.GetMergeRequestRequest
1705- 11, // 31: ermite.MergeRequestService.AddComment:output_type -> ermite.AddCommentResponse2227+ 12, // 31: ermite.MergeRequestService.AddComment:input_type -> ermite.AddCommentRequest
1706- 13, // 32: ermite.MergeRequestService.ResolveComment:output_type -> ermite.ResolveCommentResponse2228+ 14, // 32: ermite.MergeRequestService.EditComment:input_type -> ermite.EditCommentRequest
1707- 15, // 33: ermite.MergeRequestService.CloseMergeRequest:output_type -> ermite.CloseMergeRequestResponse2229+ 16, // 33: ermite.MergeRequestService.DeleteComment:input_type -> ermite.DeleteCommentRequest
1708- 17, // 34: ermite.MergeRequestService.MergeMergeRequest:output_type -> ermite.MergeMergeRequestResponse2230+ 18, // 34: ermite.MergeRequestService.ResolveComment:input_type -> ermite.ResolveCommentRequest
1709- 19, // 35: ermite.MergeRequestService.MarkRead:output_type -> ermite.MarkReadResponse2231+ 20, // 35: ermite.MergeRequestService.CloseMergeRequest:input_type -> ermite.CloseMergeRequestRequest
1710- 28, // [28:36] is the sub-list for method output_type2232+ 22, // 36: ermite.MergeRequestService.MergeMergeRequest:input_type -> ermite.MergeMergeRequestRequest
1711- 20, // [20:28] is the sub-list for method input_type2233+ 24, // 37: ermite.MergeRequestService.MarkRead:input_type -> ermite.MarkReadRequest
1712- 20, // [20:20] is the sub-list for extension type_name2234+ 7, // 38: ermite.MergeRequestService.CreateMergeRequest:output_type -> ermite.CreateMergeRequestResponse
1713- 20, // [20:20] is the sub-list for extension extendee2235+ 9, // 39: ermite.MergeRequestService.ListMergeRequests:output_type -> ermite.ListMergeRequestsResponse
1714- 0, // [0:20] is the sub-list for field type_name2236+ 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 +42 -3
@@ -17,7 +17,8 @@ service EventService {
1717 //
1818 // The events are repo_created, repo_updated, repo_deleted, pushed, gap and,
1919 // for merge requests, merge_request_opened, merge_request_merged,
20- // merge_request_closed and comment_added. Each one is delivered on the
20+ // merge_request_closed, comment_added, comment_edited, comment_deleted and
21+ // comment_resolved (a thread resolved or reopened). Each one is delivered on the
2122 // "repo:<name>" topic of its repository and on "home", subject to the
2223 // visibility of the repository.
2324 //
@@ -30,8 +31,8 @@ service EventService {
3031 // is not guaranteed, between jobs and runs or between two updates of the same
3132 // one: a client keeps the copy with the higher Run.version or
3233 // RunJob.version and drops the other. There is no event for a change of title or
33- // description, nor for a resolved comment: after a gap, or to see such
34- // changes, clients read the merge request again. A merge publishes
34+ // description: after a gap, or to see such changes, clients read the merge
35+ // request again. A merge publishes
3536 // merge_request_merged, then pushed for the target branch.
3637 //
3738 // The server keeps a bounded buffer of recent events. With resume_after set,
@@ -102,6 +103,12 @@ message Event {
102103 RunUpdated run_updated = 12;
103104 // JobUpdated: a CI job was created or changed.
104105 JobUpdated job_updated = 13;
106+ // CommentEdited: the text of a merge request comment was changed.
107+ CommentEdited comment_edited = 14;
108+ // CommentDeleted: a merge request comment was deleted.
109+ CommentDeleted comment_deleted = 15;
110+ // CommentResolved: a merge request comment was resolved or unresolved.
111+ CommentResolved comment_resolved = 16;
105112 }
106113 }
107114
@@ -170,6 +177,38 @@ message CommentAdded {
170177 Comment comment = 3;
171178 }
172179
180+// CommentEdited reports a comment of a merge request whose text was changed.
181+message CommentEdited {
182+ // Repo is the name of the repository.
183+ string repo = 1;
184+ // Number is the number of the merge request.
185+ int64 number = 2;
186+ // Comment is the comment after the edit.
187+ Comment comment = 3;
188+}
189+
190+// CommentDeleted reports a comment of a merge request that was deleted. The
191+// comment stays in the thread with deleted set and an empty text.
192+message CommentDeleted {
193+ // Repo is the name of the repository.
194+ string repo = 1;
195+ // Number is the number of the merge request.
196+ int64 number = 2;
197+ // Comment is the comment after the deletion.
198+ Comment comment = 3;
199+}
200+
201+// CommentResolved reports a comment of a merge request whose resolved state
202+// changed.
203+message CommentResolved {
204+ // Repo is the name of the repository.
205+ string repo = 1;
206+ // Number is the number of the merge request.
207+ int64 number = 2;
208+ // Comment is the comment after the change.
209+ Comment comment = 3;
210+}
211+
173212 // Gap tells the client that events were lost: the requested resume point is
174213 // older than the server's buffer. It has no fields. The client should reload
175214 // the state it displays (repositories, refs, merge requests and their
@@ -17,7 +17,8 @@ service EventService {
17 //17 //
18 // The events are repo_created, repo_updated, repo_deleted, pushed, gap and,18 // The events are repo_created, repo_updated, repo_deleted, pushed, gap and,
19 // for merge requests, merge_request_opened, merge_request_merged,19 // for merge requests, merge_request_opened, merge_request_merged,
20- // merge_request_closed and comment_added. Each one is delivered on the20+ // merge_request_closed, comment_added, comment_edited, comment_deleted and
21+ // comment_resolved (a thread resolved or reopened). Each one is delivered on the
21 // "repo:<name>" topic of its repository and on "home", subject to the22 // "repo:<name>" topic of its repository and on "home", subject to the
22 // visibility of the repository.23 // visibility of the repository.
23 //24 //
@@ -30,8 +31,8 @@ service EventService {
30 // is not guaranteed, between jobs and runs or between two updates of the same31 // is not guaranteed, between jobs and runs or between two updates of the same
31 // one: a client keeps the copy with the higher Run.version or32 // one: a client keeps the copy with the higher Run.version or
32 // RunJob.version and drops the other. There is no event for a change of title or33 // RunJob.version and drops the other. There is no event for a change of title or
33- // description, nor for a resolved comment: after a gap, or to see such34+ // description: after a gap, or to see such changes, clients read the merge
34- // changes, clients read the merge request again. A merge publishes35+ // request again. A merge publishes
35 // merge_request_merged, then pushed for the target branch.36 // merge_request_merged, then pushed for the target branch.
36 //37 //
37 // The server keeps a bounded buffer of recent events. With resume_after set,38 // The server keeps a bounded buffer of recent events. With resume_after set,
@@ -102,6 +103,12 @@ message Event {
102 RunUpdated run_updated = 12;103 RunUpdated run_updated = 12;
103 // JobUpdated: a CI job was created or changed.104 // JobUpdated: a CI job was created or changed.
104 JobUpdated job_updated = 13;105 JobUpdated job_updated = 13;
106+ // CommentEdited: the text of a merge request comment was changed.
107+ CommentEdited comment_edited = 14;
108+ // CommentDeleted: a merge request comment was deleted.
109+ CommentDeleted comment_deleted = 15;
110+ // CommentResolved: a merge request comment was resolved or unresolved.
111+ CommentResolved comment_resolved = 16;
105 }112 }
106 }113 }
107 114
@@ -170,6 +177,38 @@ message CommentAdded {
170 Comment comment = 3;177 Comment comment = 3;
171 }178 }
172 179
180+// CommentEdited reports a comment of a merge request whose text was changed.
181+message CommentEdited {
182+ // Repo is the name of the repository.
183+ string repo = 1;
184+ // Number is the number of the merge request.
185+ int64 number = 2;
186+ // Comment is the comment after the edit.
187+ Comment comment = 3;
188+}
189+
190+// CommentDeleted reports a comment of a merge request that was deleted. The
191+// comment stays in the thread with deleted set and an empty text.
192+message CommentDeleted {
193+ // Repo is the name of the repository.
194+ string repo = 1;
195+ // Number is the number of the merge request.
196+ int64 number = 2;
197+ // Comment is the comment after the deletion.
198+ Comment comment = 3;
199+}
200+
201+// CommentResolved reports a comment of a merge request whose resolved state
202+// changed.
203+message CommentResolved {
204+ // Repo is the name of the repository.
205+ string repo = 1;
206+ // Number is the number of the merge request.
207+ int64 number = 2;
208+ // Comment is the comment after the change.
209+ Comment comment = 3;
210+}
211+
173 // Gap tells the client that events were lost: the requested resume point is212 // 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 reload213 // older than the server's buffer. It has no fields. The client should reload
175 // the state it displays (repositories, refs, merge requests and their214 // the state it displays (repositories, refs, merge requests and their
M proto/ermite/merge_request.proto +128 -10
@@ -33,6 +33,17 @@ enum DiffSide {
3333 DIFF_SIDE_NEW = 2;
3434 }
3535
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+
3647 // MergeRequest asks to merge one branch of a repository into another branch
3748 // of the same repository. It is about a branch, not about who wrote it.
3849 message MergeRequest {
@@ -97,13 +108,50 @@ message Comment {
97108 // When it differs from the current head the line may have moved; clients
98109 // may show the comment as outdated.
99110 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.
102115 string text = 7;
103116 // Resolved is true once the comment was marked resolved.
104117 bool resolved = 8;
105118 // CreatedAt is when the comment was written.
106119 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;
107155 }
108156
109157 // MergeRequestService reviews and merges branches.
@@ -143,14 +191,35 @@ service MergeRequestService {
143191 // caller last marked read with the current head. Fails with not_found if
144192 // the repository or the number is unknown.
145193 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.
151204 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
154223 // failed_precondition if the merge request is not open. Setting the state
155224 // the comment already has succeeds and changes nothing.
156225 rpc ResolveComment(ResolveCommentRequest) returns (ResolveCommentResponse);
@@ -272,6 +341,9 @@ message GetMergeRequestResponse {
272341 // diff against the target. A client should tell the reader to review the
273342 // whole change again.
274343 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;
275347 }
276348
277349 // AddCommentRequest describes the comment to add.
@@ -290,8 +362,19 @@ message AddCommentRequest {
290362 int32 line = 4;
291363 // Side is the side line counts on. Required when path is set.
292364 DiffSide side = 5;
293- // Text is the plain-text content. Required.
365+ // Text is the Markdown source. Required, except when verdict is set.
294366 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;
295378 }
296379
297380 // AddCommentResponse holds the new comment.
@@ -300,6 +383,41 @@ message AddCommentResponse {
300383 Comment comment = 1;
301384 }
302385
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+
303421 // ResolveCommentRequest changes the resolved state of a comment.
304422 message ResolveCommentRequest {
305423 // 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 branch47 // 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; clients108 // 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 it111+ // 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 if191 // 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 breaks195+ // 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 current196+ // scope; setting a verdict also needs the mr:review scope (permission_denied
149- // diff of the merge request, and with failed_precondition if the merge197+ // 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:write205+ // 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 with206+ // 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 state223 // 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 the341 // 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 {
3939 // SCOPE_TOKEN_ADMIN allows creating, listing and revoking tokens. Wire name:
4040 // token:admin.
4141 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;
4245 }
4346
4447 // 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.

Comments0 open / 0

no comments yet.

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
l
merge request: the list of files (j k move, enter opens, esc back)
M
merge request: the merge menu; there 1–3 pick the mode, D deletes the branch, enter merges
R
merge request: mark the head read
esc
close a dialog, leave a field

Branches 2

Tags 18

↑↓ moveenter openesc close