feat(proto): repository topics (#16)
- commit
- 21da1eb04d5860002e691d8dcbe70dce89c5eb37
- author
- brice · · 2026-10-18 12:08 UTC
- committer
- bnema · · 2026-10-18 12:08 UTC
- parent
- 72f8f2e
- signature
- SSH Unverified
SHA256:VOCA5lYARHcbKDZ7GhTV45VmcjWnJ6ZQIBazj17LivAThe key is unknown - refs
- tag: v0.5.0
2 files · +55 -11
M gen/ermite/repo.pb.go +44 -10
| @@ -163,7 +163,11 @@ type Repo struct { | |||
| 163 | 163 | PushedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=pushed_at,json=pushedAt,proto3" json:"pushed_at,omitempty"` | |
| 164 | 164 | // Settings are the merge settings of the repository. Always set in a | |
| 165 | 165 | // response, with the defaults for a repository that never changed them. | |
| 166 | - | Settings *RepoSettings `protobuf:"bytes,7,opt,name=settings,proto3" json:"settings,omitempty"` | |
| 166 | + | Settings *RepoSettings `protobuf:"bytes,7,opt,name=settings,proto3" json:"settings,omitempty"` | |
| 167 | + | // Topics classify the repository, as on GitHub: at most 20, each 1-50 | |
| 168 | + | // characters from [a-z0-9-], starting with a letter or a digit, sorted | |
| 169 | + | // and without duplicates. | |
| 170 | + | Topics []string `protobuf:"bytes,8,rep,name=topics,proto3" json:"topics,omitempty"` | |
| 167 | 171 | unknownFields protoimpl.UnknownFields | |
| 168 | 172 | sizeCache protoimpl.SizeCache | |
| 169 | 173 | } | |
| @@ -247,6 +251,13 @@ func (x *Repo) GetSettings() *RepoSettings { | |||
| 247 | 251 | return nil | |
| 248 | 252 | } | |
| 249 | 253 | ||
| 254 | + | func (x *Repo) GetTopics() []string { | |
| 255 | + | if x != nil { | |
| 256 | + | return x.Topics | |
| 257 | + | } | |
| 258 | + | return nil | |
| 259 | + | } | |
| 260 | + | ||
| 250 | 261 | // ListReposRequest selects a page of repositories. | |
| 251 | 262 | type ListReposRequest struct { | |
| 252 | 263 | state protoimpl.MessageState `protogen:"open.v1"` | |
| @@ -461,7 +472,10 @@ type CreateRepoRequest struct { | |||
| 461 | 472 | // Description is an optional one-line description. | |
| 462 | 473 | Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` | |
| 463 | 474 | // Visibility of the new repository. VISIBILITY_UNSPECIFIED means private. | |
| 464 | - | Visibility Visibility `protobuf:"varint,3,opt,name=visibility,proto3,enum=ermite.Visibility" json:"visibility,omitempty"` | |
| 475 | + | Visibility Visibility `protobuf:"varint,3,opt,name=visibility,proto3,enum=ermite.Visibility" json:"visibility,omitempty"` | |
| 476 | + | // Topics are the optional topics of the new repository (see Repo.topics); | |
| 477 | + | // they are lowercased, sorted and deduplicated. | |
| 478 | + | Topics []string `protobuf:"bytes,4,rep,name=topics,proto3" json:"topics,omitempty"` | |
| 465 | 479 | unknownFields protoimpl.UnknownFields | |
| 466 | 480 | sizeCache protoimpl.SizeCache | |
| 467 | 481 | } | |
| @@ -517,6 +531,13 @@ func (x *CreateRepoRequest) GetVisibility() Visibility { | |||
| 517 | 531 | return Visibility_VISIBILITY_UNSPECIFIED | |
| 518 | 532 | } | |
| 519 | 533 | ||
| 534 | + | func (x *CreateRepoRequest) GetTopics() []string { | |
| 535 | + | if x != nil { | |
| 536 | + | return x.Topics | |
| 537 | + | } | |
| 538 | + | return nil | |
| 539 | + | } | |
| 540 | + | ||
| 520 | 541 | // CreateRepoResponse holds the new repository. | |
| 521 | 542 | type CreateRepoResponse struct { | |
| 522 | 543 | state protoimpl.MessageState `protogen:"open.v1"` | |
| @@ -580,7 +601,7 @@ type UpdateRepoRequest struct { | |||
| 580 | 601 | // the call fails with failed_precondition. | |
| 581 | 602 | DefaultBranch string `protobuf:"bytes,4,opt,name=default_branch,json=defaultBranch,proto3" json:"default_branch,omitempty"` | |
| 582 | 603 | // UpdateMask lists the fields to change: "description", "visibility", | |
| 583 | - | // "default_branch", "settings.allowed_merge_modes" and/or | |
| 604 | + | // "default_branch", "topics", "settings.allowed_merge_modes" and/or | |
| 584 | 605 | // "settings.failing_checks_block". "settings" stands for both settings | |
| 585 | 606 | // paths. It must not be empty. Other paths are invalid_argument. | |
| 586 | 607 | UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,5,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"` | |
| @@ -589,7 +610,10 @@ type UpdateRepoRequest struct { | |||
| 589 | 610 | // contain MERGE_MODE_UNSPECIFIED, otherwise the call fails with | |
| 590 | 611 | // invalid_argument. Changing settings needs the repo:admin scope, like any | |
| 591 | 612 | // other field. | |
| 592 | - | Settings *RepoSettings `protobuf:"bytes,6,opt,name=settings,proto3" json:"settings,omitempty"` | |
| 613 | + | Settings *RepoSettings `protobuf:"bytes,6,opt,name=settings,proto3" json:"settings,omitempty"` | |
| 614 | + | // Topics replace the topics of the repository (see Repo.topics). Used only | |
| 615 | + | // if update_mask contains "topics"; an empty list then clears them. | |
| 616 | + | Topics []string `protobuf:"bytes,7,rep,name=topics,proto3" json:"topics,omitempty"` | |
| 593 | 617 | unknownFields protoimpl.UnknownFields | |
| 594 | 618 | sizeCache protoimpl.SizeCache | |
| 595 | 619 | } | |
| @@ -666,6 +690,13 @@ func (x *UpdateRepoRequest) GetSettings() *RepoSettings { | |||
| 666 | 690 | return nil | |
| 667 | 691 | } | |
| 668 | 692 | ||
| 693 | + | func (x *UpdateRepoRequest) GetTopics() []string { | |
| 694 | + | if x != nil { | |
| 695 | + | return x.Topics | |
| 696 | + | } | |
| 697 | + | return nil | |
| 698 | + | } | |
| 699 | + | ||
| 669 | 700 | // UpdateRepoResponse holds the repository after the update. | |
| 670 | 701 | type UpdateRepoResponse struct { | |
| 671 | 702 | state protoimpl.MessageState `protogen:"open.v1"` | |
| @@ -802,7 +833,7 @@ const file_ermite_repo_proto_rawDesc = "" + | |||
| 802 | 833 | "\x11ermite/repo.proto\x12\x06ermite\x1a google/protobuf/field_mask.proto\x1a\x12ermite/types.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x83\x01\n" + | |
| 803 | 834 | "\fRepoSettings\x12A\n" + | |
| 804 | 835 | "\x13allowed_merge_modes\x18\x01 \x03(\x0e2\x11.ermite.MergeModeR\x11allowedMergeModes\x120\n" + | |
| 805 | - | "\x14failing_checks_block\x18\x02 \x01(\bR\x12failingChecksBlock\"\xbd\x02\n" + | |
| 836 | + | "\x14failing_checks_block\x18\x02 \x01(\bR\x12failingChecksBlock\"\xd5\x02\n" + | |
| 806 | 837 | "\x04Repo\x12\x12\n" + | |
| 807 | 838 | "\x04name\x18\x01 \x01(\tR\x04name\x12 \n" + | |
| 808 | 839 | "\vdescription\x18\x02 \x01(\tR\vdescription\x122\n" + | |
| @@ -813,7 +844,8 @@ const file_ermite_repo_proto_rawDesc = "" + | |||
| 813 | 844 | "\n" + | |
| 814 | 845 | "created_at\x18\x05 \x01(\v2\x1a.google.protobuf.TimestampR\tcreatedAt\x127\n" + | |
| 815 | 846 | "\tpushed_at\x18\x06 \x01(\v2\x1a.google.protobuf.TimestampR\bpushedAt\x120\n" + | |
| 816 | - | "\bsettings\x18\a \x01(\v2\x14.ermite.RepoSettingsR\bsettings\"N\n" + | |
| 847 | + | "\bsettings\x18\a \x01(\v2\x14.ermite.RepoSettingsR\bsettings\x12\x16\n" + | |
| 848 | + | "\x06topics\x18\b \x03(\tR\x06topics\"N\n" + | |
| 817 | 849 | "\x10ListReposRequest\x12\x1b\n" + | |
| 818 | 850 | "\tpage_size\x18\x01 \x01(\x05R\bpageSize\x12\x1d\n" + | |
| 819 | 851 | "\n" + | |
| @@ -824,15 +856,16 @@ const file_ermite_repo_proto_rawDesc = "" + | |||
| 824 | 856 | "\x0eGetRepoRequest\x12\x12\n" + | |
| 825 | 857 | "\x04repo\x18\x01 \x01(\tR\x04repo\"3\n" + | |
| 826 | 858 | "\x0fGetRepoResponse\x12 \n" + | |
| 827 | - | "\x04repo\x18\x01 \x01(\v2\f.ermite.RepoR\x04repo\"}\n" + | |
| 859 | + | "\x04repo\x18\x01 \x01(\v2\f.ermite.RepoR\x04repo\"\x95\x01\n" + | |
| 828 | 860 | "\x11CreateRepoRequest\x12\x12\n" + | |
| 829 | 861 | "\x04name\x18\x01 \x01(\tR\x04name\x12 \n" + | |
| 830 | 862 | "\vdescription\x18\x02 \x01(\tR\vdescription\x122\n" + | |
| 831 | 863 | "\n" + | |
| 832 | 864 | "visibility\x18\x03 \x01(\x0e2\x12.ermite.VisibilityR\n" + | |
| 833 | - | "visibility\"6\n" + | |
| 865 | + | "visibility\x12\x16\n" + | |
| 866 | + | "\x06topics\x18\x04 \x03(\tR\x06topics\"6\n" + | |
| 834 | 867 | "\x12CreateRepoResponse\x12 \n" + | |
| 835 | - | "\x04repo\x18\x01 \x01(\v2\f.ermite.RepoR\x04repo\"\x93\x02\n" + | |
| 868 | + | "\x04repo\x18\x01 \x01(\v2\f.ermite.RepoR\x04repo\"\xab\x02\n" + | |
| 836 | 869 | "\x11UpdateRepoRequest\x12\x12\n" + | |
| 837 | 870 | "\x04repo\x18\x01 \x01(\tR\x04repo\x12 \n" + | |
| 838 | 871 | "\vdescription\x18\x02 \x01(\tR\vdescription\x122\n" + | |
| @@ -842,7 +875,8 @@ const file_ermite_repo_proto_rawDesc = "" + | |||
| 842 | 875 | "\x0edefault_branch\x18\x04 \x01(\tR\rdefaultBranch\x12;\n" + | |
| 843 | 876 | "\vupdate_mask\x18\x05 \x01(\v2\x1a.google.protobuf.FieldMaskR\n" + | |
| 844 | 877 | "updateMask\x120\n" + | |
| 845 | - | "\bsettings\x18\x06 \x01(\v2\x14.ermite.RepoSettingsR\bsettings\"6\n" + | |
| 878 | + | "\bsettings\x18\x06 \x01(\v2\x14.ermite.RepoSettingsR\bsettings\x12\x16\n" + | |
| 879 | + | "\x06topics\x18\a \x03(\tR\x06topics\"6\n" + | |
| 846 | 880 | "\x12UpdateRepoResponse\x12 \n" + | |
| 847 | 881 | "\x04repo\x18\x01 \x01(\v2\f.ermite.RepoR\x04repo\"'\n" + | |
| 848 | 882 | "\x11DeleteRepoRequest\x12\x12\n" + | |
| @@ -163,7 +163,11 @@ type Repo struct { | |||||
| 163 | PushedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=pushed_at,json=pushedAt,proto3" json:"pushed_at,omitempty"` | 163 | PushedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=pushed_at,json=pushedAt,proto3" json:"pushed_at,omitempty"` | ||
| 164 | // Settings are the merge settings of the repository. Always set in a | 164 | // Settings are the merge settings of the repository. Always set in a | ||
| 165 | // response, with the defaults for a repository that never changed them. | 165 | // response, with the defaults for a repository that never changed them. | ||
| 166 | - | Settings *RepoSettings `protobuf:"bytes,7,opt,name=settings,proto3" json:"settings,omitempty"` | 166 | + | Settings *RepoSettings `protobuf:"bytes,7,opt,name=settings,proto3" json:"settings,omitempty"` |
| 167 | + | // Topics classify the repository, as on GitHub: at most 20, each 1-50 | |||
| 168 | + | // characters from [a-z0-9-], starting with a letter or a digit, sorted | |||
| 169 | + | // and without duplicates. | |||
| 170 | + | Topics []string `protobuf:"bytes,8,rep,name=topics,proto3" json:"topics,omitempty"` | |||
| 167 | unknownFields protoimpl.UnknownFields | 171 | unknownFields protoimpl.UnknownFields | ||
| 168 | sizeCache protoimpl.SizeCache | 172 | sizeCache protoimpl.SizeCache | ||
| 169 | } | 173 | } | ||
| @@ -247,6 +251,13 @@ func (x *Repo) GetSettings() *RepoSettings { | |||||
| 247 | return nil | 251 | return nil | ||
| 248 | } | 252 | } | ||
| 249 | 253 | ||||
| 254 | + | func (x *Repo) GetTopics() []string { | |||
| 255 | + | if x != nil { | |||
| 256 | + | return x.Topics | |||
| 257 | + | } | |||
| 258 | + | return nil | |||
| 259 | + | } | |||
| 260 | + | ||||
| 250 | // ListReposRequest selects a page of repositories. | 261 | // ListReposRequest selects a page of repositories. | ||
| 251 | type ListReposRequest struct { | 262 | type ListReposRequest struct { | ||
| 252 | state protoimpl.MessageState `protogen:"open.v1"` | 263 | state protoimpl.MessageState `protogen:"open.v1"` | ||
| @@ -461,7 +472,10 @@ type CreateRepoRequest struct { | |||||
| 461 | // Description is an optional one-line description. | 472 | // Description is an optional one-line description. | ||
| 462 | Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` | 473 | Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` | ||
| 463 | // Visibility of the new repository. VISIBILITY_UNSPECIFIED means private. | 474 | // Visibility of the new repository. VISIBILITY_UNSPECIFIED means private. | ||
| 464 | - | Visibility Visibility `protobuf:"varint,3,opt,name=visibility,proto3,enum=ermite.Visibility" json:"visibility,omitempty"` | 475 | + | Visibility Visibility `protobuf:"varint,3,opt,name=visibility,proto3,enum=ermite.Visibility" json:"visibility,omitempty"` |
| 476 | + | // Topics are the optional topics of the new repository (see Repo.topics); | |||
| 477 | + | // they are lowercased, sorted and deduplicated. | |||
| 478 | + | Topics []string `protobuf:"bytes,4,rep,name=topics,proto3" json:"topics,omitempty"` | |||
| 465 | unknownFields protoimpl.UnknownFields | 479 | unknownFields protoimpl.UnknownFields | ||
| 466 | sizeCache protoimpl.SizeCache | 480 | sizeCache protoimpl.SizeCache | ||
| 467 | } | 481 | } | ||
| @@ -517,6 +531,13 @@ func (x *CreateRepoRequest) GetVisibility() Visibility { | |||||
| 517 | return Visibility_VISIBILITY_UNSPECIFIED | 531 | return Visibility_VISIBILITY_UNSPECIFIED | ||
| 518 | } | 532 | } | ||
| 519 | 533 | ||||
| 534 | + | func (x *CreateRepoRequest) GetTopics() []string { | |||
| 535 | + | if x != nil { | |||
| 536 | + | return x.Topics | |||
| 537 | + | } | |||
| 538 | + | return nil | |||
| 539 | + | } | |||
| 540 | + | ||||
| 520 | // CreateRepoResponse holds the new repository. | 541 | // CreateRepoResponse holds the new repository. | ||
| 521 | type CreateRepoResponse struct { | 542 | type CreateRepoResponse struct { | ||
| 522 | state protoimpl.MessageState `protogen:"open.v1"` | 543 | state protoimpl.MessageState `protogen:"open.v1"` | ||
| @@ -580,7 +601,7 @@ type UpdateRepoRequest struct { | |||||
| 580 | // the call fails with failed_precondition. | 601 | // the call fails with failed_precondition. | ||
| 581 | DefaultBranch string `protobuf:"bytes,4,opt,name=default_branch,json=defaultBranch,proto3" json:"default_branch,omitempty"` | 602 | DefaultBranch string `protobuf:"bytes,4,opt,name=default_branch,json=defaultBranch,proto3" json:"default_branch,omitempty"` | ||
| 582 | // UpdateMask lists the fields to change: "description", "visibility", | 603 | // UpdateMask lists the fields to change: "description", "visibility", | ||
| 583 | - | // "default_branch", "settings.allowed_merge_modes" and/or | 604 | + | // "default_branch", "topics", "settings.allowed_merge_modes" and/or |
| 584 | // "settings.failing_checks_block". "settings" stands for both settings | 605 | // "settings.failing_checks_block". "settings" stands for both settings | ||
| 585 | // paths. It must not be empty. Other paths are invalid_argument. | 606 | // paths. It must not be empty. Other paths are invalid_argument. | ||
| 586 | UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,5,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"` | 607 | UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,5,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"` | ||
| @@ -589,7 +610,10 @@ type UpdateRepoRequest struct { | |||||
| 589 | // contain MERGE_MODE_UNSPECIFIED, otherwise the call fails with | 610 | // contain MERGE_MODE_UNSPECIFIED, otherwise the call fails with | ||
| 590 | // invalid_argument. Changing settings needs the repo:admin scope, like any | 611 | // invalid_argument. Changing settings needs the repo:admin scope, like any | ||
| 591 | // other field. | 612 | // other field. | ||
| 592 | - | Settings *RepoSettings `protobuf:"bytes,6,opt,name=settings,proto3" json:"settings,omitempty"` | 613 | + | Settings *RepoSettings `protobuf:"bytes,6,opt,name=settings,proto3" json:"settings,omitempty"` |
| 614 | + | // Topics replace the topics of the repository (see Repo.topics). Used only | |||
| 615 | + | // if update_mask contains "topics"; an empty list then clears them. | |||
| 616 | + | Topics []string `protobuf:"bytes,7,rep,name=topics,proto3" json:"topics,omitempty"` | |||
| 593 | unknownFields protoimpl.UnknownFields | 617 | unknownFields protoimpl.UnknownFields | ||
| 594 | sizeCache protoimpl.SizeCache | 618 | sizeCache protoimpl.SizeCache | ||
| 595 | } | 619 | } | ||
| @@ -666,6 +690,13 @@ func (x *UpdateRepoRequest) GetSettings() *RepoSettings { | |||||
| 666 | return nil | 690 | return nil | ||
| 667 | } | 691 | } | ||
| 668 | 692 | ||||
| 693 | + | func (x *UpdateRepoRequest) GetTopics() []string { | |||
| 694 | + | if x != nil { | |||
| 695 | + | return x.Topics | |||
| 696 | + | } | |||
| 697 | + | return nil | |||
| 698 | + | } | |||
| 699 | + | ||||
| 669 | // UpdateRepoResponse holds the repository after the update. | 700 | // UpdateRepoResponse holds the repository after the update. | ||
| 670 | type UpdateRepoResponse struct { | 701 | type UpdateRepoResponse struct { | ||
| 671 | state protoimpl.MessageState `protogen:"open.v1"` | 702 | state protoimpl.MessageState `protogen:"open.v1"` | ||
| @@ -802,7 +833,7 @@ const file_ermite_repo_proto_rawDesc = "" + | |||||
| 802 | "\x11ermite/repo.proto\x12\x06ermite\x1a google/protobuf/field_mask.proto\x1a\x12ermite/types.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x83\x01\n" + | 833 | "\x11ermite/repo.proto\x12\x06ermite\x1a google/protobuf/field_mask.proto\x1a\x12ermite/types.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x83\x01\n" + | ||
| 803 | "\fRepoSettings\x12A\n" + | 834 | "\fRepoSettings\x12A\n" + | ||
| 804 | "\x13allowed_merge_modes\x18\x01 \x03(\x0e2\x11.ermite.MergeModeR\x11allowedMergeModes\x120\n" + | 835 | "\x13allowed_merge_modes\x18\x01 \x03(\x0e2\x11.ermite.MergeModeR\x11allowedMergeModes\x120\n" + | ||
| 805 | - | "\x14failing_checks_block\x18\x02 \x01(\bR\x12failingChecksBlock\"\xbd\x02\n" + | 836 | + | "\x14failing_checks_block\x18\x02 \x01(\bR\x12failingChecksBlock\"\xd5\x02\n" + |
| 806 | "\x04Repo\x12\x12\n" + | 837 | "\x04Repo\x12\x12\n" + | ||
| 807 | "\x04name\x18\x01 \x01(\tR\x04name\x12 \n" + | 838 | "\x04name\x18\x01 \x01(\tR\x04name\x12 \n" + | ||
| 808 | "\vdescription\x18\x02 \x01(\tR\vdescription\x122\n" + | 839 | "\vdescription\x18\x02 \x01(\tR\vdescription\x122\n" + | ||
| @@ -813,7 +844,8 @@ const file_ermite_repo_proto_rawDesc = "" + | |||||
| 813 | "\n" + | 844 | "\n" + | ||
| 814 | "created_at\x18\x05 \x01(\v2\x1a.google.protobuf.TimestampR\tcreatedAt\x127\n" + | 845 | "created_at\x18\x05 \x01(\v2\x1a.google.protobuf.TimestampR\tcreatedAt\x127\n" + | ||
| 815 | "\tpushed_at\x18\x06 \x01(\v2\x1a.google.protobuf.TimestampR\bpushedAt\x120\n" + | 846 | "\tpushed_at\x18\x06 \x01(\v2\x1a.google.protobuf.TimestampR\bpushedAt\x120\n" + | ||
| 816 | - | "\bsettings\x18\a \x01(\v2\x14.ermite.RepoSettingsR\bsettings\"N\n" + | 847 | + | "\bsettings\x18\a \x01(\v2\x14.ermite.RepoSettingsR\bsettings\x12\x16\n" + |
| 848 | + | "\x06topics\x18\b \x03(\tR\x06topics\"N\n" + | |||
| 817 | "\x10ListReposRequest\x12\x1b\n" + | 849 | "\x10ListReposRequest\x12\x1b\n" + | ||
| 818 | "\tpage_size\x18\x01 \x01(\x05R\bpageSize\x12\x1d\n" + | 850 | "\tpage_size\x18\x01 \x01(\x05R\bpageSize\x12\x1d\n" + | ||
| 819 | "\n" + | 851 | "\n" + | ||
| @@ -824,15 +856,16 @@ const file_ermite_repo_proto_rawDesc = "" + | |||||
| 824 | "\x0eGetRepoRequest\x12\x12\n" + | 856 | "\x0eGetRepoRequest\x12\x12\n" + | ||
| 825 | "\x04repo\x18\x01 \x01(\tR\x04repo\"3\n" + | 857 | "\x04repo\x18\x01 \x01(\tR\x04repo\"3\n" + | ||
| 826 | "\x0fGetRepoResponse\x12 \n" + | 858 | "\x0fGetRepoResponse\x12 \n" + | ||
| 827 | - | "\x04repo\x18\x01 \x01(\v2\f.ermite.RepoR\x04repo\"}\n" + | 859 | + | "\x04repo\x18\x01 \x01(\v2\f.ermite.RepoR\x04repo\"\x95\x01\n" + |
| 828 | "\x11CreateRepoRequest\x12\x12\n" + | 860 | "\x11CreateRepoRequest\x12\x12\n" + | ||
| 829 | "\x04name\x18\x01 \x01(\tR\x04name\x12 \n" + | 861 | "\x04name\x18\x01 \x01(\tR\x04name\x12 \n" + | ||
| 830 | "\vdescription\x18\x02 \x01(\tR\vdescription\x122\n" + | 862 | "\vdescription\x18\x02 \x01(\tR\vdescription\x122\n" + | ||
| 831 | "\n" + | 863 | "\n" + | ||
| 832 | "visibility\x18\x03 \x01(\x0e2\x12.ermite.VisibilityR\n" + | 864 | "visibility\x18\x03 \x01(\x0e2\x12.ermite.VisibilityR\n" + | ||
| 833 | - | "visibility\"6\n" + | 865 | + | "visibility\x12\x16\n" + |
| 866 | + | "\x06topics\x18\x04 \x03(\tR\x06topics\"6\n" + | |||
| 834 | "\x12CreateRepoResponse\x12 \n" + | 867 | "\x12CreateRepoResponse\x12 \n" + | ||
| 835 | - | "\x04repo\x18\x01 \x01(\v2\f.ermite.RepoR\x04repo\"\x93\x02\n" + | 868 | + | "\x04repo\x18\x01 \x01(\v2\f.ermite.RepoR\x04repo\"\xab\x02\n" + |
| 836 | "\x11UpdateRepoRequest\x12\x12\n" + | 869 | "\x11UpdateRepoRequest\x12\x12\n" + | ||
| 837 | "\x04repo\x18\x01 \x01(\tR\x04repo\x12 \n" + | 870 | "\x04repo\x18\x01 \x01(\tR\x04repo\x12 \n" + | ||
| 838 | "\vdescription\x18\x02 \x01(\tR\vdescription\x122\n" + | 871 | "\vdescription\x18\x02 \x01(\tR\vdescription\x122\n" + | ||
| @@ -842,7 +875,8 @@ const file_ermite_repo_proto_rawDesc = "" + | |||||
| 842 | "\x0edefault_branch\x18\x04 \x01(\tR\rdefaultBranch\x12;\n" + | 875 | "\x0edefault_branch\x18\x04 \x01(\tR\rdefaultBranch\x12;\n" + | ||
| 843 | "\vupdate_mask\x18\x05 \x01(\v2\x1a.google.protobuf.FieldMaskR\n" + | 876 | "\vupdate_mask\x18\x05 \x01(\v2\x1a.google.protobuf.FieldMaskR\n" + | ||
| 844 | "updateMask\x120\n" + | 877 | "updateMask\x120\n" + | ||
| 845 | - | "\bsettings\x18\x06 \x01(\v2\x14.ermite.RepoSettingsR\bsettings\"6\n" + | 878 | + | "\bsettings\x18\x06 \x01(\v2\x14.ermite.RepoSettingsR\bsettings\x12\x16\n" + |
| 879 | + | "\x06topics\x18\a \x03(\tR\x06topics\"6\n" + | |||
| 846 | "\x12UpdateRepoResponse\x12 \n" + | 880 | "\x12UpdateRepoResponse\x12 \n" + | ||
| 847 | "\x04repo\x18\x01 \x01(\v2\f.ermite.RepoR\x04repo\"'\n" + | 881 | "\x04repo\x18\x01 \x01(\v2\f.ermite.RepoR\x04repo\"'\n" + | ||
| 848 | "\x11DeleteRepoRequest\x12\x12\n" + | 882 | "\x11DeleteRepoRequest\x12\x12\n" + | ||
M proto/ermite/repo.proto +11 -1
| @@ -56,6 +56,10 @@ message Repo { | |||
| 56 | 56 | // Settings are the merge settings of the repository. Always set in a | |
| 57 | 57 | // response, with the defaults for a repository that never changed them. | |
| 58 | 58 | RepoSettings settings = 7; | |
| 59 | + | // Topics classify the repository, as on GitHub: at most 20, each 1-50 | |
| 60 | + | // characters from [a-z0-9-], starting with a letter or a digit, sorted | |
| 61 | + | // and without duplicates. | |
| 62 | + | repeated string topics = 8; | |
| 59 | 63 | } | |
| 60 | 64 | ||
| 61 | 65 | // RepoService manages repositories and their metadata. | |
| @@ -121,6 +125,9 @@ message CreateRepoRequest { | |||
| 121 | 125 | string description = 2; | |
| 122 | 126 | // Visibility of the new repository. VISIBILITY_UNSPECIFIED means private. | |
| 123 | 127 | Visibility visibility = 3; | |
| 128 | + | // Topics are the optional topics of the new repository (see Repo.topics); | |
| 129 | + | // they are lowercased, sorted and deduplicated. | |
| 130 | + | repeated string topics = 4; | |
| 124 | 131 | } | |
| 125 | 132 | ||
| 126 | 133 | // CreateRepoResponse holds the new repository. | |
| @@ -145,7 +152,7 @@ message UpdateRepoRequest { | |||
| 145 | 152 | // the call fails with failed_precondition. | |
| 146 | 153 | string default_branch = 4; | |
| 147 | 154 | // UpdateMask lists the fields to change: "description", "visibility", | |
| 148 | - | // "default_branch", "settings.allowed_merge_modes" and/or | |
| 155 | + | // "default_branch", "topics", "settings.allowed_merge_modes" and/or | |
| 149 | 156 | // "settings.failing_checks_block". "settings" stands for both settings | |
| 150 | 157 | // paths. It must not be empty. Other paths are invalid_argument. | |
| 151 | 158 | google.protobuf.FieldMask update_mask = 5; | |
| @@ -155,6 +162,9 @@ message UpdateRepoRequest { | |||
| 155 | 162 | // invalid_argument. Changing settings needs the repo:admin scope, like any | |
| 156 | 163 | // other field. | |
| 157 | 164 | RepoSettings settings = 6; | |
| 165 | + | // Topics replace the topics of the repository (see Repo.topics). Used only | |
| 166 | + | // if update_mask contains "topics"; an empty list then clears them. | |
| 167 | + | repeated string topics = 7; | |
| 158 | 168 | } | |
| 159 | 169 | ||
| 160 | 170 | // UpdateRepoResponse holds the repository after the update. | |
| @@ -56,6 +56,10 @@ message Repo { | |||||
| 56 | // Settings are the merge settings of the repository. Always set in a | 56 | // Settings are the merge settings of the repository. Always set in a | ||
| 57 | // response, with the defaults for a repository that never changed them. | 57 | // response, with the defaults for a repository that never changed them. | ||
| 58 | RepoSettings settings = 7; | 58 | RepoSettings settings = 7; | ||
| 59 | + | // Topics classify the repository, as on GitHub: at most 20, each 1-50 | |||
| 60 | + | // characters from [a-z0-9-], starting with a letter or a digit, sorted | |||
| 61 | + | // and without duplicates. | |||
| 62 | + | repeated string topics = 8; | |||
| 59 | } | 63 | } | ||
| 60 | 64 | ||||
| 61 | // RepoService manages repositories and their metadata. | 65 | // RepoService manages repositories and their metadata. | ||
| @@ -121,6 +125,9 @@ message CreateRepoRequest { | |||||
| 121 | string description = 2; | 125 | string description = 2; | ||
| 122 | // Visibility of the new repository. VISIBILITY_UNSPECIFIED means private. | 126 | // Visibility of the new repository. VISIBILITY_UNSPECIFIED means private. | ||
| 123 | Visibility visibility = 3; | 127 | Visibility visibility = 3; | ||
| 128 | + | // Topics are the optional topics of the new repository (see Repo.topics); | |||
| 129 | + | // they are lowercased, sorted and deduplicated. | |||
| 130 | + | repeated string topics = 4; | |||
| 124 | } | 131 | } | ||
| 125 | 132 | ||||
| 126 | // CreateRepoResponse holds the new repository. | 133 | // CreateRepoResponse holds the new repository. | ||
| @@ -145,7 +152,7 @@ message UpdateRepoRequest { | |||||
| 145 | // the call fails with failed_precondition. | 152 | // the call fails with failed_precondition. | ||
| 146 | string default_branch = 4; | 153 | string default_branch = 4; | ||
| 147 | // UpdateMask lists the fields to change: "description", "visibility", | 154 | // UpdateMask lists the fields to change: "description", "visibility", | ||
| 148 | - | // "default_branch", "settings.allowed_merge_modes" and/or | 155 | + | // "default_branch", "topics", "settings.allowed_merge_modes" and/or |
| 149 | // "settings.failing_checks_block". "settings" stands for both settings | 156 | // "settings.failing_checks_block". "settings" stands for both settings | ||
| 150 | // paths. It must not be empty. Other paths are invalid_argument. | 157 | // paths. It must not be empty. Other paths are invalid_argument. | ||
| 151 | google.protobuf.FieldMask update_mask = 5; | 158 | google.protobuf.FieldMask update_mask = 5; | ||
| @@ -155,6 +162,9 @@ message UpdateRepoRequest { | |||||
| 155 | // invalid_argument. Changing settings needs the repo:admin scope, like any | 162 | // invalid_argument. Changing settings needs the repo:admin scope, like any | ||
| 156 | // other field. | 163 | // other field. | ||
| 157 | RepoSettings settings = 6; | 164 | RepoSettings settings = 6; | ||
| 165 | + | // Topics replace the topics of the repository (see Repo.topics). Used only | |||
| 166 | + | // if update_mask contains "topics"; an empty list then clears them. | |||
| 167 | + | repeated string topics = 7; | |||
| 158 | } | 168 | } | ||
| 159 | 169 | ||||
| 160 | // UpdateRepoResponse holds the repository after the update. | 170 | // UpdateRepoResponse holds the repository after the update. | ||