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(_(%q(There was an error updating the dashboard, branch named: %{branch} already exists.))%{branch: params[:branch]},:bad_request)unlessnew_or_default_branch?