docs(proto): scope issue event ids to their issue and describe merge request history of unlinked issues
5 files · +23 -16
M docs/services.md +1 -1
| @@ -8,7 +8,7 @@ | |||
| 8 | 8 | | `MergeRequestService` | `CreateMergeRequest`, `ListMergeRequests`, `GetMergeRequest` (commits, diff, comments), `AddComment`, `EditComment`, `DeleteComment`, `ResolveComment`, `CloseMergeRequest`, `MarkReady`, `MergeMergeRequest` (modes fast-forward, squash, merge commit), `MarkRead`, `EnableAutoMerge`, `CancelAutoMerge` (merge by itself once a check passed on the head and all its runs are complete; setting `allow_auto_merge`, `MergeRequest.auto_merge`, events `MergeRequestAutoMergeEnabled` and `MergeRequestAutoMergeCancelled`, `MergeRequestMerged.auto`; feature `merge_requests.auto_merge`). Open merge requests carry `mergeability` (up to date, behind, conflict, or checking) and `Watch` publishes `MergeRequestMergeability` each time a result is settled for new branch tips (feature `merge_requests.mergeability`) | | |
| 9 | 9 | | `IssueService` | `CreateIssue`, `ListIssues`, `GetIssue` (comments, merge requests naming the issue, history events, `closed_by_merge_request`), `AddIssueComment`, `CloseIssue`, `ResolveIssue`, `ReopenIssue`; owner only: `ListPendingIssues`, `ApproveIssue`, `RejectIssue`. States `OPEN`, `CLOSED`, `RESOLVED`; `ResolveIssue` needs `issue:write`. Features `issues`, `issues.links`, `issues.resolve`. Issues share numbers with merge requests | | |
| 10 | 10 | | `SessionService` | `CreateLoginLink`, `SignOutEverywhere` (owner only) | | |
| 11 | - | | `EventService` | `Watch` (streamed, resumable). Topics `home`, `repo:<name>` and `owner` (owner rights only). Events 17–21: `issue_opened`, `issue_closed`, `issue_resolved` (event 31), `issue_reopened`, `issue_commented`, and `issue_submitted` (only on `owner`, no content). Event 22: `merge_request_mergeability` | | |
| 11 | + | | `EventService` | `Watch` (streamed, resumable). Topics `home`, `repo:<name>` and `owner` (owner rights only). Events 17–21: `issue_opened`, `issue_closed`, `issue_reopened`, `issue_commented`, and `issue_submitted` (only on `owner`, no content). Event 22: `merge_request_mergeability`. Event 31: `issue_resolved` | | |
| 12 | 12 | | `ServerService` | `GetVersion` (version and features), `GetSigningKey`, `RotateOIDCKey` (owner only) | | |
| 13 | 13 | | `TrustedKeyService` | `ListTrustedKeys`, `AddTrustedKey` and `RemoveTrustedKey` (owner only). `Commit.verification` carries the result of the check (feature `commit_signatures`) | | |
| 14 | 14 | | `RunService` | `ListRuns`, `GetRun`, `GetJob`, `GetJobLog` (streamed, follow), `ListAnnotations`, `GetStepSummaries`, `CancelRun`, `RerunRun`, `DispatchWorkflow`, `ListWorkflows`, `DisableWorkflow`, `EnableWorkflow`, `ListChecks`, `ListRunners`, `RemoveRunner` | | |
| @@ -8,7 +8,7 @@ | |||||
| 8 | | `MergeRequestService` | `CreateMergeRequest`, `ListMergeRequests`, `GetMergeRequest` (commits, diff, comments), `AddComment`, `EditComment`, `DeleteComment`, `ResolveComment`, `CloseMergeRequest`, `MarkReady`, `MergeMergeRequest` (modes fast-forward, squash, merge commit), `MarkRead`, `EnableAutoMerge`, `CancelAutoMerge` (merge by itself once a check passed on the head and all its runs are complete; setting `allow_auto_merge`, `MergeRequest.auto_merge`, events `MergeRequestAutoMergeEnabled` and `MergeRequestAutoMergeCancelled`, `MergeRequestMerged.auto`; feature `merge_requests.auto_merge`). Open merge requests carry `mergeability` (up to date, behind, conflict, or checking) and `Watch` publishes `MergeRequestMergeability` each time a result is settled for new branch tips (feature `merge_requests.mergeability`) | | 8 | | `MergeRequestService` | `CreateMergeRequest`, `ListMergeRequests`, `GetMergeRequest` (commits, diff, comments), `AddComment`, `EditComment`, `DeleteComment`, `ResolveComment`, `CloseMergeRequest`, `MarkReady`, `MergeMergeRequest` (modes fast-forward, squash, merge commit), `MarkRead`, `EnableAutoMerge`, `CancelAutoMerge` (merge by itself once a check passed on the head and all its runs are complete; setting `allow_auto_merge`, `MergeRequest.auto_merge`, events `MergeRequestAutoMergeEnabled` and `MergeRequestAutoMergeCancelled`, `MergeRequestMerged.auto`; feature `merge_requests.auto_merge`). Open merge requests carry `mergeability` (up to date, behind, conflict, or checking) and `Watch` publishes `MergeRequestMergeability` each time a result is settled for new branch tips (feature `merge_requests.mergeability`) | | ||
| 9 | | `IssueService` | `CreateIssue`, `ListIssues`, `GetIssue` (comments, merge requests naming the issue, history events, `closed_by_merge_request`), `AddIssueComment`, `CloseIssue`, `ResolveIssue`, `ReopenIssue`; owner only: `ListPendingIssues`, `ApproveIssue`, `RejectIssue`. States `OPEN`, `CLOSED`, `RESOLVED`; `ResolveIssue` needs `issue:write`. Features `issues`, `issues.links`, `issues.resolve`. Issues share numbers with merge requests | | 9 | | `IssueService` | `CreateIssue`, `ListIssues`, `GetIssue` (comments, merge requests naming the issue, history events, `closed_by_merge_request`), `AddIssueComment`, `CloseIssue`, `ResolveIssue`, `ReopenIssue`; owner only: `ListPendingIssues`, `ApproveIssue`, `RejectIssue`. States `OPEN`, `CLOSED`, `RESOLVED`; `ResolveIssue` needs `issue:write`. Features `issues`, `issues.links`, `issues.resolve`. Issues share numbers with merge requests | | ||
| 10 | | `SessionService` | `CreateLoginLink`, `SignOutEverywhere` (owner only) | | 10 | | `SessionService` | `CreateLoginLink`, `SignOutEverywhere` (owner only) | | ||
| 11 | - | | `EventService` | `Watch` (streamed, resumable). Topics `home`, `repo:<name>` and `owner` (owner rights only). Events 17–21: `issue_opened`, `issue_closed`, `issue_resolved` (event 31), `issue_reopened`, `issue_commented`, and `issue_submitted` (only on `owner`, no content). Event 22: `merge_request_mergeability` | | 11 | + | | `EventService` | `Watch` (streamed, resumable). Topics `home`, `repo:<name>` and `owner` (owner rights only). Events 17–21: `issue_opened`, `issue_closed`, `issue_reopened`, `issue_commented`, and `issue_submitted` (only on `owner`, no content). Event 22: `merge_request_mergeability`. Event 31: `issue_resolved` | |
| 12 | | `ServerService` | `GetVersion` (version and features), `GetSigningKey`, `RotateOIDCKey` (owner only) | | 12 | | `ServerService` | `GetVersion` (version and features), `GetSigningKey`, `RotateOIDCKey` (owner only) | | ||
| 13 | | `TrustedKeyService` | `ListTrustedKeys`, `AddTrustedKey` and `RemoveTrustedKey` (owner only). `Commit.verification` carries the result of the check (feature `commit_signatures`) | | 13 | | `TrustedKeyService` | `ListTrustedKeys`, `AddTrustedKey` and `RemoveTrustedKey` (owner only). `Commit.verification` carries the result of the check (feature `commit_signatures`) | | ||
| 14 | | `RunService` | `ListRuns`, `GetRun`, `GetJob`, `GetJobLog` (streamed, follow), `ListAnnotations`, `GetStepSummaries`, `CancelRun`, `RerunRun`, `DispatchWorkflow`, `ListWorkflows`, `DisableWorkflow`, `EnableWorkflow`, `ListChecks`, `ListRunners`, `RemoveRunner` | | 14 | | `RunService` | `ListRuns`, `GetRun`, `GetJob`, `GetJobLog` (streamed, follow), `ListAnnotations`, `GetStepSummaries`, `CancelRun`, `RerunRun`, `DispatchWorkflow`, `ListWorkflows`, `DisableWorkflow`, `EnableWorkflow`, `ListChecks`, `ListRunners`, `RemoveRunner` | | ||
M gen/ermite/ermiteconnect/event.connect.go +8 -6
| @@ -49,9 +49,10 @@ type EventServiceClient interface { | |||
| 49 | 49 | // for merge requests, merge_request_opened, merge_request_merged, | |
| 50 | 50 | // merge_request_closed, comment_added, comment_edited, comment_deleted and | |
| 51 | 51 | // comment_resolved (a thread resolved or reopened); for issues, issue_opened, | |
| 52 | - | // issue_closed, issue_resolved, issue_reopened and issue_commented, and issue_submitted. Each | |
| 53 | - | // one is delivered on the "repo:<name>" topic of its repository and on | |
| 54 | - | // "home", subject to the visibility of the repository, except | |
| 52 | + | // issue_closed, issue_resolved, issue_reopened and issue_commented, and | |
| 53 | + | // issue_submitted. Each one is delivered on the "repo:<name>" topic of its | |
| 54 | + | // repository and on "home", subject to the visibility of the repository, | |
| 55 | + | // except | |
| 55 | 56 | // issue_submitted: it is delivered only on the "owner" topic, never on | |
| 56 | 57 | // "home" or "repo:<name>", and carries no content (see IssueSubmitted). | |
| 57 | 58 | // | |
| @@ -125,9 +126,10 @@ type EventServiceHandler interface { | |||
| 125 | 126 | // for merge requests, merge_request_opened, merge_request_merged, | |
| 126 | 127 | // merge_request_closed, comment_added, comment_edited, comment_deleted and | |
| 127 | 128 | // comment_resolved (a thread resolved or reopened); for issues, issue_opened, | |
| 128 | - | // issue_closed, issue_resolved, issue_reopened and issue_commented, and issue_submitted. Each | |
| 129 | - | // one is delivered on the "repo:<name>" topic of its repository and on | |
| 130 | - | // "home", subject to the visibility of the repository, except | |
| 129 | + | // issue_closed, issue_resolved, issue_reopened and issue_commented, and | |
| 130 | + | // issue_submitted. Each one is delivered on the "repo:<name>" topic of its | |
| 131 | + | // repository and on "home", subject to the visibility of the repository, | |
| 132 | + | // except | |
| 131 | 133 | // issue_submitted: it is delivered only on the "owner" topic, never on | |
| 132 | 134 | // "home" or "repo:<name>", and carries no content (see IssueSubmitted). | |
| 133 | 135 | // | |
| @@ -49,9 +49,10 @@ type EventServiceClient interface { | |||||
| 49 | // for merge requests, merge_request_opened, merge_request_merged, | 49 | // for merge requests, merge_request_opened, merge_request_merged, | ||
| 50 | // merge_request_closed, comment_added, comment_edited, comment_deleted and | 50 | // merge_request_closed, comment_added, comment_edited, comment_deleted and | ||
| 51 | // comment_resolved (a thread resolved or reopened); for issues, issue_opened, | 51 | // comment_resolved (a thread resolved or reopened); for issues, issue_opened, | ||
| 52 | - | // issue_closed, issue_resolved, issue_reopened and issue_commented, and issue_submitted. Each | 52 | + | // issue_closed, issue_resolved, issue_reopened and issue_commented, and |
| 53 | - | // one is delivered on the "repo:<name>" topic of its repository and on | 53 | + | // issue_submitted. Each one is delivered on the "repo:<name>" topic of its |
| 54 | - | // "home", subject to the visibility of the repository, except | 54 | + | // repository and on "home", subject to the visibility of the repository, |
| 55 | + | // except | |||
| 55 | // issue_submitted: it is delivered only on the "owner" topic, never on | 56 | // issue_submitted: it is delivered only on the "owner" topic, never on | ||
| 56 | // "home" or "repo:<name>", and carries no content (see IssueSubmitted). | 57 | // "home" or "repo:<name>", and carries no content (see IssueSubmitted). | ||
| 57 | // | 58 | // | ||
| @@ -125,9 +126,10 @@ type EventServiceHandler interface { | |||||
| 125 | // for merge requests, merge_request_opened, merge_request_merged, | 126 | // for merge requests, merge_request_opened, merge_request_merged, | ||
| 126 | // merge_request_closed, comment_added, comment_edited, comment_deleted and | 127 | // merge_request_closed, comment_added, comment_edited, comment_deleted and | ||
| 127 | // comment_resolved (a thread resolved or reopened); for issues, issue_opened, | 128 | // comment_resolved (a thread resolved or reopened); for issues, issue_opened, | ||
| 128 | - | // issue_closed, issue_resolved, issue_reopened and issue_commented, and issue_submitted. Each | 129 | + | // issue_closed, issue_resolved, issue_reopened and issue_commented, and |
| 129 | - | // one is delivered on the "repo:<name>" topic of its repository and on | 130 | + | // issue_submitted. Each one is delivered on the "repo:<name>" topic of its |
| 130 | - | // "home", subject to the visibility of the repository, except | 131 | + | // repository and on "home", subject to the visibility of the repository, |
| 132 | + | // except | |||
| 131 | // issue_submitted: it is delivered only on the "owner" topic, never on | 133 | // issue_submitted: it is delivered only on the "owner" topic, never on | ||
| 132 | // "home" or "repo:<name>", and carries no content (see IssueSubmitted). | 134 | // "home" or "repo:<name>", and carries no content (see IssueSubmitted). | ||
| 133 | // | 135 | // | ||
M gen/ermite/merge_request.pb.go +5 -3
| @@ -1386,7 +1386,8 @@ func (x *MergeRequestIssue) GetCloses() bool { | |||
| 1386 | 1386 | // a reference that later disappears does not remove its event. | |
| 1387 | 1387 | type IssueEvent struct { | |
| 1388 | 1388 | state protoimpl.MessageState `protogen:"open.v1"` | |
| 1389 | - | // Id identifies the event. Opaque. | |
| 1389 | + | // Id identifies the event within its issue. Opaque. Events of different | |
| 1390 | + | // issues can share an id: key them by (issue, id). | |
| 1390 | 1391 | Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` | |
| 1391 | 1392 | // Kind is what happened. | |
| 1392 | 1393 | Kind IssueEventKind `protobuf:"varint,2,opt,name=kind,proto3,enum=ermite.IssueEventKind" json:"kind,omitempty"` | |
| @@ -1605,8 +1606,9 @@ type GetMergeRequestResponse struct { | |||
| 1605 | 1606 | // ascending by number, at most 100. Empty when issues are off. | |
| 1606 | 1607 | Issues []*MergeRequestIssue `protobuf:"bytes,11,rep,name=issues,proto3" json:"issues,omitempty"` | |
| 1607 | 1608 | // IssueEvents are the history entries that involve this merge request: the | |
| 1608 | - | // REFERENCED and RESOLVED events of the issues it names, oldest first, at | |
| 1609 | - | // most 500. | |
| 1609 | + | // REFERENCED and RESOLVED events of the issues it names or once named, | |
| 1610 | + | // oldest first, at most 500. An event can name an issue that is no longer | |
| 1611 | + | // in issues. Empty when issues are off. | |
| 1610 | 1612 | IssueEvents []*IssueEvent `protobuf:"bytes,12,rep,name=issue_events,json=issueEvents,proto3" json:"issue_events,omitempty"` | |
| 1611 | 1613 | unknownFields protoimpl.UnknownFields | |
| 1612 | 1614 | sizeCache protoimpl.SizeCache | |
| @@ -1386,7 +1386,8 @@ func (x *MergeRequestIssue) GetCloses() bool { | |||||
| 1386 | // a reference that later disappears does not remove its event. | 1386 | // a reference that later disappears does not remove its event. | ||
| 1387 | type IssueEvent struct { | 1387 | type IssueEvent struct { | ||
| 1388 | state protoimpl.MessageState `protogen:"open.v1"` | 1388 | state protoimpl.MessageState `protogen:"open.v1"` | ||
| 1389 | - | // Id identifies the event. Opaque. | 1389 | + | // Id identifies the event within its issue. Opaque. Events of different |
| 1390 | + | // issues can share an id: key them by (issue, id). | |||
| 1390 | Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` | 1391 | Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` | ||
| 1391 | // Kind is what happened. | 1392 | // Kind is what happened. | ||
| 1392 | Kind IssueEventKind `protobuf:"varint,2,opt,name=kind,proto3,enum=ermite.IssueEventKind" json:"kind,omitempty"` | 1393 | Kind IssueEventKind `protobuf:"varint,2,opt,name=kind,proto3,enum=ermite.IssueEventKind" json:"kind,omitempty"` | ||
| @@ -1605,8 +1606,9 @@ type GetMergeRequestResponse struct { | |||||
| 1605 | // ascending by number, at most 100. Empty when issues are off. | 1606 | // ascending by number, at most 100. Empty when issues are off. | ||
| 1606 | Issues []*MergeRequestIssue `protobuf:"bytes,11,rep,name=issues,proto3" json:"issues,omitempty"` | 1607 | Issues []*MergeRequestIssue `protobuf:"bytes,11,rep,name=issues,proto3" json:"issues,omitempty"` | ||
| 1607 | // IssueEvents are the history entries that involve this merge request: the | 1608 | // IssueEvents are the history entries that involve this merge request: the | ||
| 1608 | - | // REFERENCED and RESOLVED events of the issues it names, oldest first, at | 1609 | + | // REFERENCED and RESOLVED events of the issues it names or once named, |
| 1609 | - | // most 500. | 1610 | + | // oldest first, at most 500. An event can name an issue that is no longer |
| 1611 | + | // in issues. Empty when issues are off. | |||
| 1610 | IssueEvents []*IssueEvent `protobuf:"bytes,12,rep,name=issue_events,json=issueEvents,proto3" json:"issue_events,omitempty"` | 1612 | IssueEvents []*IssueEvent `protobuf:"bytes,12,rep,name=issue_events,json=issueEvents,proto3" json:"issue_events,omitempty"` | ||
| 1611 | unknownFields protoimpl.UnknownFields | 1613 | unknownFields protoimpl.UnknownFields | ||
| 1612 | sizeCache protoimpl.SizeCache | 1614 | sizeCache protoimpl.SizeCache | ||
M proto/ermite/event.proto +4 -3
| @@ -21,9 +21,10 @@ service EventService { | |||
| 21 | 21 | // for merge requests, merge_request_opened, merge_request_merged, | |
| 22 | 22 | // merge_request_closed, comment_added, comment_edited, comment_deleted and | |
| 23 | 23 | // comment_resolved (a thread resolved or reopened); for issues, issue_opened, | |
| 24 | - | // issue_closed, issue_resolved, issue_reopened and issue_commented, and issue_submitted. Each | |
| 25 | - | // one is delivered on the "repo:<name>" topic of its repository and on | |
| 26 | - | // "home", subject to the visibility of the repository, except | |
| 24 | + | // issue_closed, issue_resolved, issue_reopened and issue_commented, and | |
| 25 | + | // issue_submitted. Each one is delivered on the "repo:<name>" topic of its | |
| 26 | + | // repository and on "home", subject to the visibility of the repository, | |
| 27 | + | // except | |
| 27 | 28 | // issue_submitted: it is delivered only on the "owner" topic, never on | |
| 28 | 29 | // "home" or "repo:<name>", and carries no content (see IssueSubmitted). | |
| 29 | 30 | // | |
| @@ -21,9 +21,10 @@ service EventService { | |||||
| 21 | // for merge requests, merge_request_opened, merge_request_merged, | 21 | // for merge requests, merge_request_opened, merge_request_merged, | ||
| 22 | // merge_request_closed, comment_added, comment_edited, comment_deleted and | 22 | // merge_request_closed, comment_added, comment_edited, comment_deleted and | ||
| 23 | // comment_resolved (a thread resolved or reopened); for issues, issue_opened, | 23 | // comment_resolved (a thread resolved or reopened); for issues, issue_opened, | ||
| 24 | - | // issue_closed, issue_resolved, issue_reopened and issue_commented, and issue_submitted. Each | 24 | + | // issue_closed, issue_resolved, issue_reopened and issue_commented, and |
| 25 | - | // one is delivered on the "repo:<name>" topic of its repository and on | 25 | + | // issue_submitted. Each one is delivered on the "repo:<name>" topic of its |
| 26 | - | // "home", subject to the visibility of the repository, except | 26 | + | // repository and on "home", subject to the visibility of the repository, |
| 27 | + | // except | |||
| 27 | // issue_submitted: it is delivered only on the "owner" topic, never on | 28 | // issue_submitted: it is delivered only on the "owner" topic, never on | ||
| 28 | // "home" or "repo:<name>", and carries no content (see IssueSubmitted). | 29 | // "home" or "repo:<name>", and carries no content (see IssueSubmitted). | ||
| 29 | // | 30 | // | ||
M proto/ermite/merge_request.proto +5 -3
| @@ -449,7 +449,8 @@ enum IssueEventKind { | |||
| 449 | 449 | // IssueEvent is one entry in the history of an issue. Events are append-only: | |
| 450 | 450 | // a reference that later disappears does not remove its event. | |
| 451 | 451 | message IssueEvent { | |
| 452 | - | // Id identifies the event. Opaque. | |
| 452 | + | // Id identifies the event within its issue. Opaque. Events of different | |
| 453 | + | // issues can share an id: key them by (issue, id). | |
| 453 | 454 | string id = 1; | |
| 454 | 455 | // Kind is what happened. | |
| 455 | 456 | IssueEventKind kind = 2; | |
| @@ -525,8 +526,9 @@ message GetMergeRequestResponse { | |||
| 525 | 526 | // ascending by number, at most 100. Empty when issues are off. | |
| 526 | 527 | repeated MergeRequestIssue issues = 11; | |
| 527 | 528 | // IssueEvents are the history entries that involve this merge request: the | |
| 528 | - | // REFERENCED and RESOLVED events of the issues it names, oldest first, at | |
| 529 | - | // most 500. | |
| 529 | + | // REFERENCED and RESOLVED events of the issues it names or once named, | |
| 530 | + | // oldest first, at most 500. An event can name an issue that is no longer | |
| 531 | + | // in issues. Empty when issues are off. | |
| 530 | 532 | repeated IssueEvent issue_events = 12; | |
| 531 | 533 | } | |
| 532 | 534 | ||
| @@ -449,7 +449,8 @@ enum IssueEventKind { | |||||
| 449 | // IssueEvent is one entry in the history of an issue. Events are append-only: | 449 | // IssueEvent is one entry in the history of an issue. Events are append-only: | ||
| 450 | // a reference that later disappears does not remove its event. | 450 | // a reference that later disappears does not remove its event. | ||
| 451 | message IssueEvent { | 451 | message IssueEvent { | ||
| 452 | - | // Id identifies the event. Opaque. | 452 | + | // Id identifies the event within its issue. Opaque. Events of different |
| 453 | + | // issues can share an id: key them by (issue, id). | |||
| 453 | string id = 1; | 454 | string id = 1; | ||
| 454 | // Kind is what happened. | 455 | // Kind is what happened. | ||
| 455 | IssueEventKind kind = 2; | 456 | IssueEventKind kind = 2; | ||
| @@ -525,8 +526,9 @@ message GetMergeRequestResponse { | |||||
| 525 | // ascending by number, at most 100. Empty when issues are off. | 526 | // ascending by number, at most 100. Empty when issues are off. | ||
| 526 | repeated MergeRequestIssue issues = 11; | 527 | repeated MergeRequestIssue issues = 11; | ||
| 527 | // IssueEvents are the history entries that involve this merge request: the | 528 | // IssueEvents are the history entries that involve this merge request: the | ||
| 528 | - | // REFERENCED and RESOLVED events of the issues it names, oldest first, at | 529 | + | // REFERENCED and RESOLVED events of the issues it names or once named, |
| 529 | - | // most 500. | 530 | + | // oldest first, at most 500. An event can name an issue that is no longer |
| 531 | + | // in issues. Empty when issues are off. | |||
| 530 | repeated IssueEvent issue_events = 12; | 532 | repeated IssueEvent issue_events = 12; | ||
| 531 | } | 533 | } | ||
| 532 | 534 | ||||