returnerror(_(%q(You are not allowed to push into this branch. Create another branch or open a merge request.)),:forbidden)unlesspush_authorized?
returnerror("You are not allowed to push into this branch. Create another branch or open a merge request.",:forbidden)unlesspush_authorized?
success(result)
end
defcheck_branch_name(result)
returnerror(_(%q(There was an error updating the dashboard, branch name is invalid.)),:bad_request)unlessvalid_branch_name?
returnerror(_('There was an error updating the dashboard, branch named: %{branch} already exists.')%{branch: params[:branch]},:bad_request)unlessnew_or_default_branch?
returnerror("There was an error updating the dashboard, branch name is invalid.",:bad_request)unlessvalid_branch_name?
returnerror("There was an error updating the dashboard, branch named: #{branch} already exists.",:bad_request)unlessnew_or_default_branch?