Commit 31a2c541 authored by Stan Hu's avatar Stan Hu

Merge branch 'ff-on-mr-issues-link' into 'master'

Added feature flag around release link urls

See merge request gitlab-org/gitlab!18727
parents dfc6c167 e3769e1f
......@@ -122,10 +122,6 @@ Example response:
}
]
},
"_links":{
"merge_requests_url": "https://gitlab.example.com/root/awesome_app/merge_requests?release_tag=v0.2&scope=all&state=opened",
"issues_url": "https://gitlab.example.com/root/awesome_app/issues?release_tag=v0.2&scope=all&state=opened"
}
},
{
"tag_name":"v0.1",
......@@ -182,10 +178,6 @@ Example response:
]
},
"_links":{
"merge_requests_url": "https://gitlab.example.com/root/awesome_app/merge_requests?release_tag=v0.1&scope=all&state=opened",
"issues_url": "https://gitlab.example.com/root/awesome_app/issues?release_tag=v0.1&scope=all&state=opened"
}
}
]
```
......@@ -297,10 +289,6 @@ Example response:
]
},
"_links":{
"merge_requests_url": "https://gitlab.example.com/root/awesome_app/merge_requests?release_tag=v0.1&scope=all&state=opened",
"issues_url": "https://gitlab.example.com/root/awesome_app/issues?release_tag=v0.1&scope=all&state=opened"
}
}
```
......@@ -426,10 +414,6 @@ Example response:
}
]
},
"_links":{
"merge_requests_url": "https://gitlab.example.com/root/awesome_app/merge_requests?release_tag=v0.3&scope=all&state=opened",
"issues_url": "https://gitlab.example.com/root/awesome_app/issues?release_tag=v0.3&scope=all&state=opened"
}
}
```
......@@ -531,10 +515,6 @@ Example response:
]
},
"_links":{
"merge_requests_url": "https://gitlab.example.com/root/awesome_app/merge_requests?release_tag=v0.1&scope=all&state=opened",
"issues_url": "https://gitlab.example.com/root/awesome_app/issues?release_tag=v0.1&scope=all&state=opened"
}
}
```
......@@ -617,10 +597,6 @@ Example response:
]
},
"_links":{
"merge_requests_url": "https://gitlab.example.com/root/awesome_app/merge_requests?release_tag=v0.1&scope=all&state=opened",
"issues_url": "https://gitlab.example.com/root/awesome_app/issues?release_tag=v0.1&scope=all&state=opened"
}
}
```
......
......@@ -1315,8 +1315,8 @@ module API
end
end
expose :_links do
expose :merge_requests_url
expose :issues_url
expose :merge_requests_url, if: -> (_) { release_mr_issue_urls_available? }
expose :issues_url, if: -> (_) { release_mr_issue_urls_available? }
end
private
......@@ -1347,6 +1347,10 @@ module API
{ scope: 'all', state: 'opened', release_tag: object.tag }
end
def release_mr_issue_urls_available?
::Feature.enabled?(:release_mr_issue_urls, project)
end
def project
@project ||= object.project
end
......
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