fix(api): enforce mustNotBeArchived on repo topics routes (#39260) (#39266)

Co-authored-by: Rathina Devan E M <emrathinadev@gmail.com>
Co-authored-by: silverwind <me@silverwind.io>
This commit is contained in:
Giteabot
2026-09-08 20:15:45 +02:00
committed by GitHub
co-authored by Rathina Devan E M silverwind
parent bc11b8ac22
commit e8e8bbdbb5
5 changed files with 54 additions and 3 deletions
+6
View File
@@ -100,6 +100,8 @@ func UpdateTopics(ctx *context.APIContext) {
// "$ref": "#/responses/notFound"
// "422":
// "$ref": "#/responses/invalidTopicsError"
// "423":
// "$ref": "#/responses/repoArchivedError"
form := web.GetForm(ctx).(*api.RepoTopicOptions)
topicNames := form.Topics
@@ -161,6 +163,8 @@ func AddTopic(ctx *context.APIContext) {
// "$ref": "#/responses/notFound"
// "422":
// "$ref": "#/responses/invalidTopicsError"
// "423":
// "$ref": "#/responses/repoArchivedError"
topicName := strings.TrimSpace(strings.ToLower(ctx.PathParam("topic")))
@@ -228,6 +232,8 @@ func DeleteTopic(ctx *context.APIContext) {
// "$ref": "#/responses/notFound"
// "422":
// "$ref": "#/responses/invalidTopicsError"
// "423":
// "$ref": "#/responses/repoArchivedError"
topicName := strings.TrimSpace(strings.ToLower(ctx.PathParam("topic")))