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 generated file: collapsed
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. | ||