Commit 152d17d6 authored by Bob Van Landuyt's avatar Bob Van Landuyt

Merge branch 'nfriend-rename-open-links-to-opened' into 'master'

Rename `open*` release links to `opened*` in GraphQL endpoint

See merge request gitlab-org/gitlab!46497
parents fb7dc6c3 e0b5221a
......@@ -15,22 +15,22 @@ module Types
field :edit_url, GraphQL::STRING_TYPE, null: true,
description: "HTTP URL of the release's edit page",
authorize: :update_release
field :open_merge_requests_url, GraphQL::STRING_TYPE, null: true,
field :opened_merge_requests_url, GraphQL::STRING_TYPE, null: true,
description: 'HTTP URL of the merge request page, filtered by this release and `state=open`'
field :merged_merge_requests_url, GraphQL::STRING_TYPE, null: true,
description: 'HTTP URL of the merge request page , filtered by this release and `state=merged`'
field :closed_merge_requests_url, GraphQL::STRING_TYPE, null: true,
description: 'HTTP URL of the merge request page , filtered by this release and `state=closed`'
field :open_issues_url, GraphQL::STRING_TYPE, null: true,
field :opened_issues_url, GraphQL::STRING_TYPE, null: true,
description: 'HTTP URL of the issues page, filtered by this release and `state=open`'
field :closed_issues_url, GraphQL::STRING_TYPE, null: true,
description: 'HTTP URL of the issues page, filtered by this release and `state=closed`'
field :merge_requests_url, GraphQL::STRING_TYPE, null: true, method: :open_merge_requests_url,
field :merge_requests_url, GraphQL::STRING_TYPE, null: true, method: :opened_merge_requests_url,
description: 'HTTP URL of the merge request page filtered by this release',
deprecated: { reason: 'Use `open_merge_requests_url`', milestone: '13.6' }
field :issues_url, GraphQL::STRING_TYPE, null: true, method: :open_issues_url,
deprecated: { reason: 'Use `openedMergeRequestsUrl`', milestone: '13.6' }
field :issues_url, GraphQL::STRING_TYPE, null: true, method: :opened_issues_url,
description: 'HTTP URL of the issues page filtered by this release',
deprecated: { reason: 'Use `open_issues_url`', milestone: '13.6' }
deprecated: { reason: 'Use `openedIssuesUrl`', milestone: '13.6' }
end
end
......@@ -23,7 +23,7 @@ class ReleasePresenter < Gitlab::View::Presenter::Delegated
project_release_url(project, release)
end
def open_merge_requests_url
def opened_merge_requests_url
return unless release_mr_issue_urls_available?
project_merge_requests_url(project, params_for_issues_and_mrs)
......@@ -41,7 +41,7 @@ class ReleasePresenter < Gitlab::View::Presenter::Delegated
project_merge_requests_url(project, params_for_issues_and_mrs(state: 'closed'))
end
def open_issues_url
def opened_issues_url
return unless release_mr_issue_urls_available?
project_issues_url(project, params_for_issues_and_mrs)
......
......@@ -17273,14 +17273,14 @@ type ReleaseLinks {
editUrl: String
"""
HTTP URL of the issues page filtered by this release. Deprecated in 13.6: Use `open_issues_url`
HTTP URL of the issues page filtered by this release. Deprecated in 13.6: Use `openedIssuesUrl`
"""
issuesUrl: String @deprecated(reason: "Use `open_issues_url`. Deprecated in 13.6")
issuesUrl: String @deprecated(reason: "Use `openedIssuesUrl`. Deprecated in 13.6")
"""
HTTP URL of the merge request page filtered by this release. Deprecated in 13.6: Use `open_merge_requests_url`
HTTP URL of the merge request page filtered by this release. Deprecated in 13.6: Use `openedMergeRequestsUrl`
"""
mergeRequestsUrl: String @deprecated(reason: "Use `open_merge_requests_url`. Deprecated in 13.6")
mergeRequestsUrl: String @deprecated(reason: "Use `openedMergeRequestsUrl`. Deprecated in 13.6")
"""
HTTP URL of the merge request page , filtered by this release and `state=merged`
......@@ -17290,12 +17290,12 @@ type ReleaseLinks {
"""
HTTP URL of the issues page, filtered by this release and `state=open`
"""
openIssuesUrl: String
openedIssuesUrl: String
"""
HTTP URL of the merge request page, filtered by this release and `state=open`
"""
openMergeRequestsUrl: String
openedMergeRequestsUrl: String
"""
HTTP URL of the release
......
......@@ -49821,7 +49821,7 @@
},
{
"name": "issuesUrl",
"description": "HTTP URL of the issues page filtered by this release. Deprecated in 13.6: Use `open_issues_url`",
"description": "HTTP URL of the issues page filtered by this release. Deprecated in 13.6: Use `openedIssuesUrl`",
"args": [
],
......@@ -49831,11 +49831,11 @@
"ofType": null
},
"isDeprecated": true,
"deprecationReason": "Use `open_issues_url`. Deprecated in 13.6"
"deprecationReason": "Use `openedIssuesUrl`. Deprecated in 13.6"
},
{
"name": "mergeRequestsUrl",
"description": "HTTP URL of the merge request page filtered by this release. Deprecated in 13.6: Use `open_merge_requests_url`",
"description": "HTTP URL of the merge request page filtered by this release. Deprecated in 13.6: Use `openedMergeRequestsUrl`",
"args": [
],
......@@ -49845,7 +49845,7 @@
"ofType": null
},
"isDeprecated": true,
"deprecationReason": "Use `open_merge_requests_url`. Deprecated in 13.6"
"deprecationReason": "Use `openedMergeRequestsUrl`. Deprecated in 13.6"
},
{
"name": "mergedMergeRequestsUrl",
......@@ -49862,7 +49862,7 @@
"deprecationReason": null
},
{
"name": "openIssuesUrl",
"name": "openedIssuesUrl",
"description": "HTTP URL of the issues page, filtered by this release and `state=open`",
"args": [
......@@ -49876,7 +49876,7 @@
"deprecationReason": null
},
{
"name": "openMergeRequestsUrl",
"name": "openedMergeRequestsUrl",
"description": "HTTP URL of the merge request page, filtered by this release and `state=open`",
"args": [
......@@ -2304,11 +2304,11 @@ Evidence for a release.
| `closedIssuesUrl` | String | HTTP URL of the issues page, filtered by this release and `state=closed` |
| `closedMergeRequestsUrl` | String | HTTP URL of the merge request page , filtered by this release and `state=closed` |
| `editUrl` | String | HTTP URL of the release's edit page |
| `issuesUrl` **{warning-solid}** | String | **Deprecated:** Use `open_issues_url`. Deprecated in 13.6 |
| `mergeRequestsUrl` **{warning-solid}** | String | **Deprecated:** Use `open_merge_requests_url`. Deprecated in 13.6 |
| `issuesUrl` **{warning-solid}** | String | **Deprecated:** Use `openedIssuesUrl`. Deprecated in 13.6 |
| `mergeRequestsUrl` **{warning-solid}** | String | **Deprecated:** Use `openedMergeRequestsUrl`. Deprecated in 13.6 |
| `mergedMergeRequestsUrl` | String | HTTP URL of the merge request page , filtered by this release and `state=merged` |
| `openIssuesUrl` | String | HTTP URL of the issues page, filtered by this release and `state=open` |
| `openMergeRequestsUrl` | String | HTTP URL of the merge request page, filtered by this release and `state=open` |
| `openedIssuesUrl` | String | HTTP URL of the issues page, filtered by this release and `state=open` |
| `openedMergeRequestsUrl` | String | HTTP URL of the merge request page, filtered by this release and `state=open` |
| `selfUrl` | String | HTTP URL of the release |
### ReleaseSource
......
......@@ -30,8 +30,8 @@ module API
expose :evidences, using: Entities::Releases::Evidence, expose_nil: false, if: ->(_, _) { can_download_code? }
expose :_links do
expose :self_url, as: :self, expose_nil: false
expose :open_merge_requests_url, as: :merge_requests_url, expose_nil: false
expose :open_issues_url, as: :issues_url, expose_nil: false
expose :opened_merge_requests_url, as: :merge_requests_url, expose_nil: false
expose :opened_issues_url, as: :issues_url, expose_nil: false
expose :edit_url, expose_nil: false
end
......
......@@ -8,10 +8,10 @@ RSpec.describe GitlabSchema.types['ReleaseLinks'] do
it 'has the expected fields' do
expected_fields = %w[
selfUrl
openMergeRequestsUrl
openedMergeRequestsUrl
mergedMergeRequestsUrl
closedMergeRequestsUrl
openIssuesUrl
openedIssuesUrl
closedIssuesUrl
editUrl
mergeRequestsUrl
......
......@@ -64,8 +64,8 @@ RSpec.describe ReleasePresenter do
end
end
describe '#open_merge_requests_url' do
subject { presenter.open_merge_requests_url }
describe '#opened_merge_requests_url' do
subject { presenter.opened_merge_requests_url }
it 'returns merge requests url with state=open' do
is_expected.to eq(project_merge_requests_url(project, opened_url_params))
......@@ -112,8 +112,8 @@ RSpec.describe ReleasePresenter do
end
end
describe '#open_issues_url' do
subject { presenter.open_issues_url }
describe '#opened_issues_url' do
subject { presenter.opened_issues_url }
it 'returns issues url with state=open' do
is_expected.to eq(project_issues_url(project, opened_url_params))
......
......@@ -184,10 +184,10 @@ RSpec.describe 'Query.project(fullPath).release(tagName)' do
let(:release_fields) do
query_graphql_field(:links, nil, %{
selfUrl
openMergeRequestsUrl
openedMergeRequestsUrl
mergedMergeRequestsUrl
closedMergeRequestsUrl
openIssuesUrl
openedIssuesUrl
closedIssuesUrl
mergeRequestsUrl
issuesUrl
......@@ -199,10 +199,10 @@ RSpec.describe 'Query.project(fullPath).release(tagName)' do
expect(data).to eq(
'selfUrl' => project_release_url(project, release),
'openMergeRequestsUrl' => project_merge_requests_url(project, opened_url_params),
'openedMergeRequestsUrl' => project_merge_requests_url(project, opened_url_params),
'mergedMergeRequestsUrl' => project_merge_requests_url(project, merged_url_params),
'closedMergeRequestsUrl' => project_merge_requests_url(project, closed_url_params),
'openIssuesUrl' => project_issues_url(project, opened_url_params),
'openedIssuesUrl' => project_issues_url(project, opened_url_params),
'closedIssuesUrl' => project_issues_url(project, closed_url_params),
'mergeRequestsUrl' => project_merge_requests_url(project, opened_url_params),
'issuesUrl' => project_issues_url(project, opened_url_params)
......
......@@ -42,10 +42,10 @@ RSpec.describe 'Query.project(fullPath).releases()' do
}
links {
selfUrl
openMergeRequestsUrl
openedMergeRequestsUrl
mergedMergeRequestsUrl
closedMergeRequestsUrl
openIssuesUrl
openedIssuesUrl
closedIssuesUrl
mergeRequestsUrl
issuesUrl
......@@ -111,10 +111,10 @@ RSpec.describe 'Query.project(fullPath).releases()' do
},
'links' => {
'selfUrl' => project_release_url(project, release),
'openMergeRequestsUrl' => project_merge_requests_url(project, opened_url_params),
'openedMergeRequestsUrl' => project_merge_requests_url(project, opened_url_params),
'mergedMergeRequestsUrl' => project_merge_requests_url(project, merged_url_params),
'closedMergeRequestsUrl' => project_merge_requests_url(project, closed_url_params),
'openIssuesUrl' => project_issues_url(project, opened_url_params),
'openedIssuesUrl' => project_issues_url(project, opened_url_params),
'closedIssuesUrl' => project_issues_url(project, closed_url_params),
'mergeRequestsUrl' => project_merge_requests_url(project, opened_url_params),
'issuesUrl' => project_issues_url(project, opened_url_params)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment