From 51c9b5434564de1452f486d051f948b03e8a5512 Mon Sep 17 00:00:00 2001 From: Vlad Wolanyk Date: Wed, 17 Dec 2025 21:37:24 -0500 Subject: [PATCH] Add tags to discussions rest endpoints Changelog: fixed --- .rubocop_todo/api/description_tags.yml | 1 - lib/api/discussions.rb | 9 +++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.rubocop_todo/api/description_tags.yml b/.rubocop_todo/api/description_tags.yml index 771020dd0a3181..7d2e75ce61bc0b 100644 --- a/.rubocop_todo/api/description_tags.yml +++ b/.rubocop_todo/api/description_tags.yml @@ -76,7 +76,6 @@ API/DescriptionTags: - 'lib/api/ci/triggers.rb' - 'lib/api/commit_statuses.rb' - 'lib/api/custom_attributes_endpoints.rb' - - 'lib/api/discussions.rb' - 'lib/api/draft_notes.rb' - 'lib/api/events.rb' - 'lib/api/files.rb' diff --git a/lib/api/discussions.rb b/lib/api/discussions.rb index 14b6b786f675db..bd9abc4186a0f6 100644 --- a/lib/api/discussions.rb +++ b/lib/api/discussions.rb @@ -33,6 +33,7 @@ class Discussions < ::API::Base resource parent_type.pluralize.to_sym, requirements: API::NAMESPACE_OR_PROJECT_REQUIREMENTS do desc "Get a list of #{notable_name} discussions" do success Entities::Discussion + tags ['discussions'] end params do requires :noteable_id, type: notable_id_type, desc: "The ID of the #{notable_name}" @@ -50,6 +51,7 @@ class Discussions < ::API::Base desc "Get a single #{notable_name} discussion" do success Entities::Discussion + tags ['discussions'] end params do requires :discussion_id, type: String, desc: 'The ID of a discussion' @@ -70,6 +72,7 @@ class Discussions < ::API::Base desc "Create a new #{notable_name} discussion" do success Entities::Discussion + tags ['discussions'] end params do requires :noteable_id, type: notable_id_type, desc: "The ID of the #{notable_name}" @@ -133,6 +136,7 @@ class Discussions < ::API::Base end desc "Get comments in a single #{notable_name} discussion" do success Entities::Discussion + tags ['discussions'] end params do requires :discussion_id, type: String, desc: 'The ID of a discussion' @@ -151,6 +155,7 @@ class Discussions < ::API::Base desc "Add a comment to a #{notable_name} discussion" do success Entities::Note + tags ['discussions'] end params do requires :noteable_id, type: notable_id_type, desc: "The ID of the #{notable_name}" @@ -184,6 +189,7 @@ class Discussions < ::API::Base desc "Get a comment in a #{notable_name} discussion" do success Entities::Note + tags ['discussions'] end params do requires :noteable_id, type: notable_id_type, desc: "The ID of the #{notable_name}" @@ -198,6 +204,7 @@ class Discussions < ::API::Base desc "Edit a comment in a #{notable_name} discussion" do success Entities::Note + tags ['discussions'] end params do requires :noteable_id, type: notable_id_type, desc: "The ID of the #{notable_name}" @@ -219,6 +226,7 @@ class Discussions < ::API::Base desc "Delete a comment in a #{notable_name} discussion" do success Entities::Note + tags ['discussions'] end params do requires :noteable_id, type: notable_id_type, desc: "The ID of the #{notable_name}" @@ -234,6 +242,7 @@ class Discussions < ::API::Base if Noteable.resolvable_types.include?(noteable_type.to_s) desc "Resolve/unresolve an existing #{notable_name} discussion" do success Entities::Discussion + tags ['discussions'] end params do requires :noteable_id, type: notable_id_type, desc: "The ID of the #{notable_name}" -- GitLab