diff --git a/app/graphql/mutations/notes/create/base.rb b/app/graphql/mutations/notes/create/base.rb index c9df1672e3fb076b970f84a88310da215f6368d2..22cccbce91a60030104b3943b4fb30fbc799fa48 100644 --- a/app/graphql/mutations/notes/create/base.rb +++ b/app/graphql/mutations/notes/create/base.rb @@ -18,12 +18,6 @@ class Base < Mutations::Notes::Base required: true, description: copy_field_description(Types::Notes::NoteType, :body) - argument :confidential, - GraphQL::Types::Boolean, - required: false, - description: 'Confidentiality flag of a note. Default is false.', - deprecated: { reason: :renamed, replacement: 'internal', milestone: '15.3' } - argument :internal, GraphQL::Types::Boolean, required: false, @@ -51,7 +45,7 @@ def create_note_params(noteable, args) { noteable: noteable, note: args[:body], - internal: args[:internal] || args[:confidential] + internal: args[:internal] } end diff --git a/app/graphql/types/notes/note_type.rb b/app/graphql/types/notes/note_type.rb index d1e917b73c79b3821ff0ce01c92bffe9609721c1..97a7f038b7f53c896134df278a81025e02510836 100644 --- a/app/graphql/types/notes/note_type.rb +++ b/app/graphql/types/notes/note_type.rb @@ -49,16 +49,6 @@ class NoteType < BaseObject null: true, description: 'List of emoji reactions associated with the note.' - field :confidential, GraphQL::Types::Boolean, - null: true, - description: 'Indicates if the note is confidential.', - method: :confidential?, - deprecated: { - reason: :renamed, - replacement: 'internal', - milestone: '15.5' - } - field :internal, GraphQL::Types::Boolean, null: true, description: 'Indicates if the note is internal.', diff --git a/data/deprecations/15-5-confidential-field-on-notes.yml b/data/deprecations/15-5-confidential-field-on-notes.yml index f9a9afba0ed0fcef39aff54ad0d60e8209ff8831..2165b56710be07f94ee31600416f8f1e24c31418 100644 --- a/data/deprecations/15-5-confidential-field-on-notes.yml +++ b/data/deprecations/15-5-confidential-field-on-notes.yml @@ -1,6 +1,6 @@ - title: 'GraphQL field `confidential` changed to `internal` on notes' announcement_milestone: '15.5' - removal_milestone: '16.0' + removal_milestone: '17.0' breaking_change: true reporter: nicolasdular stage: plan diff --git a/doc/api/graphql/reference/index.md b/doc/api/graphql/reference/index.md index 5e7b38edc150088c5be57ec793ea59aad56dcaf6..b2ae6b5e4dab6eac2dbed7e31f4f3cfbcb2a307c 100644 --- a/doc/api/graphql/reference/index.md +++ b/doc/api/graphql/reference/index.md @@ -3104,7 +3104,6 @@ Input type: `CreateDiffNoteInput` | ---- | ---- | ----------- | | <a id="mutationcreatediffnotebody"></a>`body` | [`String!`](#string) | Content of the note. | | <a id="mutationcreatediffnoteclientmutationid"></a>`clientMutationId` | [`String`](#string) | A unique identifier for the client performing the mutation. | -| <a id="mutationcreatediffnoteconfidential"></a>`confidential` **{warning-solid}** | [`Boolean`](#boolean) | **Deprecated:** This was renamed. Please use `internal`. Deprecated in GitLab 15.3. | | <a id="mutationcreatediffnoteinternal"></a>`internal` | [`Boolean`](#boolean) | Internal flag for a note. Default is false. | | <a id="mutationcreatediffnotenoteableid"></a>`noteableId` | [`NoteableID!`](#noteableid) | Global ID of the resource to add a note to. | | <a id="mutationcreatediffnoteposition"></a>`position` | [`DiffPositionInput!`](#diffpositioninput) | Position of the note on a diff. | @@ -3127,7 +3126,6 @@ Input type: `CreateDiscussionInput` | ---- | ---- | ----------- | | <a id="mutationcreatediscussionbody"></a>`body` | [`String!`](#string) | Content of the note. | | <a id="mutationcreatediscussionclientmutationid"></a>`clientMutationId` | [`String`](#string) | A unique identifier for the client performing the mutation. | -| <a id="mutationcreatediscussionconfidential"></a>`confidential` **{warning-solid}** | [`Boolean`](#boolean) | **Deprecated:** This was renamed. Please use `internal`. Deprecated in GitLab 15.3. | | <a id="mutationcreatediscussioninternal"></a>`internal` | [`Boolean`](#boolean) | Internal flag for a note. Default is false. | | <a id="mutationcreatediscussionnoteableid"></a>`noteableId` | [`NoteableID!`](#noteableid) | Global ID of the resource to add a note to. | @@ -3179,7 +3177,6 @@ Input type: `CreateImageDiffNoteInput` | ---- | ---- | ----------- | | <a id="mutationcreateimagediffnotebody"></a>`body` | [`String!`](#string) | Content of the note. | | <a id="mutationcreateimagediffnoteclientmutationid"></a>`clientMutationId` | [`String`](#string) | A unique identifier for the client performing the mutation. | -| <a id="mutationcreateimagediffnoteconfidential"></a>`confidential` **{warning-solid}** | [`Boolean`](#boolean) | **Deprecated:** This was renamed. Please use `internal`. Deprecated in GitLab 15.3. | | <a id="mutationcreateimagediffnoteinternal"></a>`internal` | [`Boolean`](#boolean) | Internal flag for a note. Default is false. | | <a id="mutationcreateimagediffnotenoteableid"></a>`noteableId` | [`NoteableID!`](#noteableid) | Global ID of the resource to add a note to. | | <a id="mutationcreateimagediffnoteposition"></a>`position` | [`DiffImagePositionInput!`](#diffimagepositioninput) | Position of the note on a diff. | @@ -3277,7 +3274,6 @@ Input type: `CreateNoteInput` | ---- | ---- | ----------- | | <a id="mutationcreatenotebody"></a>`body` | [`String!`](#string) | Content of the note. | | <a id="mutationcreatenoteclientmutationid"></a>`clientMutationId` | [`String`](#string) | A unique identifier for the client performing the mutation. | -| <a id="mutationcreatenoteconfidential"></a>`confidential` **{warning-solid}** | [`Boolean`](#boolean) | **Deprecated:** This was renamed. Please use `internal`. Deprecated in GitLab 15.3. | | <a id="mutationcreatenotediscussionid"></a>`discussionId` | [`DiscussionID`](#discussionid) | Global ID of the discussion the note is in reply to. | | <a id="mutationcreatenoteinternal"></a>`internal` | [`Boolean`](#boolean) | Internal flag for a note. Default is false. | | <a id="mutationcreatenotemergerequestdiffheadsha"></a>`mergeRequestDiffHeadSha` | [`String`](#string) | SHA of the head commit which is used to ensure that the merge request has not been updated since the request was sent. | @@ -25494,7 +25490,6 @@ Describes where code is deployed for a project organized by folder. | <a id="noteawardemoji"></a>`awardEmoji` | [`AwardEmojiConnection`](#awardemojiconnection) | List of emoji reactions associated with the note. (see [Connections](#connections)) | | <a id="notebody"></a>`body` | [`String!`](#string) | Content of the note. | | <a id="notebodyhtml"></a>`bodyHtml` | [`String`](#string) | GitLab Flavored Markdown rendering of the content of the note. | -| <a id="noteconfidential"></a>`confidential` **{warning-solid}** | [`Boolean`](#boolean) | **Deprecated** in GitLab 15.5. This was renamed. Use: `internal`. | | <a id="notecreatedat"></a>`createdAt` | [`Time!`](#time) | Timestamp of the note creation. | | <a id="notediscussion"></a>`discussion` | [`Discussion`](#discussion) | Discussion the note is a part of. | | <a id="noteid"></a>`id` | [`NoteID!`](#noteid) | ID of the note. | diff --git a/doc/update/deprecations.md b/doc/update/deprecations.md index 6165054ce75d19e1bd91942093ff6aa466493fef..fd234fc3ceee64d5467b9aec0fd8e38496e04e42 100644 --- a/doc/update/deprecations.md +++ b/doc/update/deprecations.md @@ -1289,6 +1289,20 @@ Use `dependencyProxyTotalSizeBytes` instead, introduced in GitLab 16.1. <div class="deprecation breaking-change" data-milestone="17.0"> +### GraphQL field `confidential` changed to `internal` on notes + +<div class="deprecation-notes"> +- Announced in GitLab <span class="milestone">15.5</span> +- Removal in GitLab <span class="milestone">17.0</span> ([breaking change](https://docs.gitlab.com/ee/update/terminology.html#breaking-change)) +- To discuss this change or learn more, see the [deprecation issue](https://gitlab.com/gitlab-org/gitlab/-/issues/371485). +</div> + +The `confidential` field for a `Note` will be deprecated and renamed to `internal`. + +</div> + +<div class="deprecation breaking-change" data-milestone="17.0"> + ### GraphQL field `registrySizeEstimated` has been deprecated <div class="deprecation-notes"> @@ -3169,20 +3183,6 @@ When checking if a runner is `paused`, API users are advised to check the boolea <div class="deprecation breaking-change" data-milestone="16.0"> -### GraphQL field `confidential` changed to `internal` on notes - -<div class="deprecation-notes"> -- Announced in GitLab <span class="milestone">15.5</span> -- Removal in GitLab <span class="milestone">16.0</span> ([breaking change](https://docs.gitlab.com/ee/update/terminology.html#breaking-change)) -- To discuss this change or learn more, see the [deprecation issue](https://gitlab.com/gitlab-org/gitlab/-/issues/371485). -</div> - -The `confidential` field for a `Note` will be deprecated and renamed to `internal`. - -</div> - -<div class="deprecation breaking-change" data-milestone="16.0"> - ### Jira DVCS connector for Jira Cloud <div class="deprecation-notes"> diff --git a/ee/spec/requests/api/graphql/mutations/notes/create/note_spec.rb b/ee/spec/requests/api/graphql/mutations/notes/create/note_spec.rb index ef46f4a7aa12cefd5d957199810a3802babf43f6..69203e70bb4ed12f768fa9b6ae1aa6a9c5751d45 100644 --- a/ee/spec/requests/api/graphql/mutations/notes/create/note_spec.rb +++ b/ee/spec/requests/api/graphql/mutations/notes/create/note_spec.rb @@ -45,12 +45,6 @@ def mutation_response it_behaves_like 'a Note mutation with confidential notes' end - context 'when using deprecated confidential param' do - let(:variables_extra) { { confidential: true } } - - it_behaves_like 'a Note mutation with confidential notes' - end - context 'when body contains quick actions' do let_it_be(:project) { create(:project, group: group) } let_it_be(:noteable) { create(:work_item, project: project) } diff --git a/spec/graphql/types/notes/note_type_spec.rb b/spec/graphql/types/notes/note_type_spec.rb index 1a76fb840f3f87e72bbb4b29eff15b248f8571e8..8163c5c772c74d9f1dadf699248fe75f5c481e55 100644 --- a/spec/graphql/types/notes/note_type_spec.rb +++ b/spec/graphql/types/notes/note_type_spec.rb @@ -11,7 +11,6 @@ body body_html award_emoji - confidential internal created_at discussion diff --git a/spec/requests/api/graphql/mutations/notes/create/note_spec.rb b/spec/requests/api/graphql/mutations/notes/create/note_spec.rb index 1c85946cbeaf13c4c62633dd1edc43a2a66ae9c0..392785dfef92c8559f4d8634b7df7a757e221d06 100644 --- a/spec/requests/api/graphql/mutations/notes/create/note_spec.rb +++ b/spec/requests/api/graphql/mutations/notes/create/note_spec.rb @@ -95,12 +95,6 @@ def mutation_response it_behaves_like 'a Note mutation with confidential notes' end - context 'when using deprecated confidential param' do - let(:variables_extra) { { confidential: true } } - - it_behaves_like 'a Note mutation with confidential notes' - end - context 'as work item' do let_it_be_with_reload(:work_item) { create(:work_item, :task, project: project) } let(:noteable) { work_item } @@ -111,12 +105,6 @@ def mutation_response it_behaves_like 'a Note mutation with confidential notes' end - context 'when using deprecated confidential param' do - let(:variables_extra) { { confidential: true } } - - it_behaves_like 'a Note mutation with confidential notes' - end - context 'without notes widget' do before do WorkItems::Type.default_by_type(:task).widget_definitions.find_by_widget_type(:notes) diff --git a/spec/support/shared_examples/graphql/notes_creation_shared_examples.rb b/spec/support/shared_examples/graphql/notes_creation_shared_examples.rb index 3ff93371c190a83eeaccc2a49a4ac91a919d36bd..62d4cd93bbc7734e2329692d52e393ccb914b66b 100644 --- a/spec/support/shared_examples/graphql/notes_creation_shared_examples.rb +++ b/spec/support/shared_examples/graphql/notes_creation_shared_examples.rb @@ -93,7 +93,6 @@ post_graphql_mutation(mutation, current_user: current_user) expect(mutation_response).to have_key('note') - expect(mutation_response['note']['confidential']).to eq(true) expect(mutation_response['note']['internal']).to eq(true) end end