Commit 03726be2 authored by Nathan Friend's avatar Nathan Friend

Remove `issues_url` and `merge_requests_url`

This commit removes two release-related fields from our REST and
GraphQL APIs: `issues_url` and `merge_requests_url`. This is not a
breaking change since these fields were never publicly available
(they have always been hidden behind a disabled feature flag).
parent 322d3488
......@@ -25,12 +25,5 @@ module Types
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: :opened_merge_requests_url,
description: 'HTTP URL of the merge request page filtered by this release',
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 `openedIssuesUrl`', milestone: '13.6' }
end
end
......@@ -17419,16 +17419,6 @@ type ReleaseLinks {
"""
editUrl: String
"""
HTTP URL of the issues page filtered by this release. Deprecated in 13.6: Use `openedIssuesUrl`
"""
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 `openedMergeRequestsUrl`
"""
mergeRequestsUrl: String @deprecated(reason: "Use `openedMergeRequestsUrl`. Deprecated in 13.6")
"""
HTTP URL of the merge request page , filtered by this release and `state=merged`
"""
......
......@@ -50230,34 +50230,6 @@
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "issuesUrl",
"description": "HTTP URL of the issues page filtered by this release. Deprecated in 13.6: Use `openedIssuesUrl`",
"args": [
],
"type": {
"kind": "SCALAR",
"name": "String",
"ofType": null
},
"isDeprecated": true,
"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 `openedMergeRequestsUrl`",
"args": [
],
"type": {
"kind": "SCALAR",
"name": "String",
"ofType": null
},
"isDeprecated": true,
"deprecationReason": "Use `openedMergeRequestsUrl`. Deprecated in 13.6"
},
{
"name": "mergedMergeRequestsUrl",
"description": "HTTP URL of the merge request page , filtered by this release and `state=merged`",
......@@ -2321,8 +2321,6 @@ 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 `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` |
| `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` |
......
......@@ -30,8 +30,6 @@ 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 :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
......
......@@ -21,7 +21,6 @@
},
"commit_path": { "type": "string" },
"tag_path": { "type": "string" },
"name": { "type": "string" },
"evidences": {
"type": "array",
"items": { "$ref": "release/evidence.json" }
......@@ -42,11 +41,8 @@
"additionalProperties": false
},
"_links": {
"required": ["merge_requests_url", "issues_url"],
"properties": {
"merge_requests_url": { "type": "string" },
"issues_url": { "type": "string" },
"edit_url": { "type": "string"}
"edit_url": { "type": "string" }
}
}
},
......
......@@ -26,11 +26,7 @@
"additionalProperties": false
},
"_links": {
"required": ["merge_requests_url", "issues_url"],
"properties": {
"merge_requests_url": { "type": "string" },
"issues_url": { "type": "string" }
}
"properties": {}
}
},
"additionalProperties": false
......
......@@ -14,8 +14,6 @@ RSpec.describe GitlabSchema.types['ReleaseLinks'] do
openedIssuesUrl
closedIssuesUrl
editUrl
mergeRequestsUrl
issuesUrl
]
expect(described_class).to include_graphql_fields(*expected_fields)
......
......@@ -189,8 +189,6 @@ RSpec.describe 'Query.project(fullPath).release(tagName)' do
closedMergeRequestsUrl
openedIssuesUrl
closedIssuesUrl
mergeRequestsUrl
issuesUrl
})
end
......@@ -203,9 +201,7 @@ RSpec.describe 'Query.project(fullPath).release(tagName)' do
'mergedMergeRequestsUrl' => project_merge_requests_url(project, merged_url_params),
'closedMergeRequestsUrl' => project_merge_requests_url(project, closed_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)
'closedIssuesUrl' => project_issues_url(project, closed_url_params)
)
end
end
......
......@@ -47,8 +47,6 @@ RSpec.describe 'Query.project(fullPath).releases()' do
closedMergeRequestsUrl
openedIssuesUrl
closedIssuesUrl
mergeRequestsUrl
issuesUrl
}
}
}
......@@ -115,9 +113,7 @@ RSpec.describe 'Query.project(fullPath).releases()' do
'mergedMergeRequestsUrl' => project_merge_requests_url(project, merged_url_params),
'closedMergeRequestsUrl' => project_merge_requests_url(project, closed_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)
'closedIssuesUrl' => project_issues_url(project, closed_url_params)
}
)
end
......
......@@ -110,22 +110,6 @@ RSpec.describe API::Releases do
expect(json_response.second['commit_path']).to eq("/#{release_1.project.full_path}/-/commit/#{release_1.commit.id}")
expect(json_response.second['tag_path']).to eq("/#{release_1.project.full_path}/-/tags/#{release_1.tag}")
end
it 'returns the merge requests and issues links, with correct query' do
get api("/projects/#{project.id}/releases", maintainer)
links = json_response.first['_links']
release = json_response.first['tag_name']
expected_query = "release_tag=#{release}&scope=all&state=opened"
path_base = "/#{project.namespace.path}/#{project.path}"
mr_uri = URI.parse(links['merge_requests_url'])
issue_uri = URI.parse(links['issues_url'])
expect(mr_uri.path).to eq("#{path_base}/-/merge_requests")
expect(issue_uri.path).to eq("#{path_base}/-/issues")
expect(mr_uri.query).to eq(expected_query)
expect(issue_uri.query).to eq(expected_query)
end
end
it 'returns an upcoming_release status for a future release' do
......
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