提交 5a160b05 编写于 作者: M Mark Fletcher

Fix protected branches API to accept name parameter with dot

上级 ee587631
---
title: Fix protected branches API to accept name parameter with dot
merge_request:
author:
type: fixed
......@@ -2,7 +2,7 @@ module API
class ProtectedBranches < Grape::API
include PaginationParams
BRANCH_ENDPOINT_REQUIREMENTS = API::PROJECT_ENDPOINT_REQUIREMENTS.merge(branch: API::NO_SLASH_URL_PART_REGEX)
BRANCH_ENDPOINT_REQUIREMENTS = API::PROJECT_ENDPOINT_REQUIREMENTS.merge(name: API::NO_SLASH_URL_PART_REGEX)
before { authorize_admin_project }
......
......@@ -80,6 +80,12 @@ describe API::ProtectedBranches do
it_behaves_like 'protected branch'
end
context 'when protected branch contains a period' do
let(:protected_name) { 'my.feature' }
it_behaves_like 'protected branch'
end
end
context 'when authenticated as a guest' do
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册