##// END OF EJS Templates
pull-requests: use proper validation of pull request title to prevent from bad errors.
marcink -
r2479:2b695b6e default
parent child Browse files
Show More
@@ -743,7 +743,7 b' class RepoPullRequestsView(RepoAppView, '
743 if errors.error_dict.get('revisions'):
743 if errors.error_dict.get('revisions'):
744 msg = 'Revisions: %s' % errors.error_dict['revisions']
744 msg = 'Revisions: %s' % errors.error_dict['revisions']
745 elif errors.error_dict.get('pullrequest_title'):
745 elif errors.error_dict.get('pullrequest_title'):
746 msg = _('Pull request requires a title with min. 3 chars')
746 msg = errors.error_dict.get('pullrequest_title')
747 else:
747 else:
748 msg = _('Error creating pull request: {}').format(errors)
748 msg = _('Error creating pull request: {}').format(errors)
749 log.exception(msg)
749 log.exception(msg)
@@ -598,7 +598,7 b' def PullRequestForm(localizer, repo_id):'
598 revisions = All(#v.NotReviewedRevisions(localizer, repo_id)(),
598 revisions = All(#v.NotReviewedRevisions(localizer, repo_id)(),
599 v.UniqueList(localizer)(not_empty=True))
599 v.UniqueList(localizer)(not_empty=True))
600 review_members = formencode.ForEach(ReviewerForm())
600 review_members = formencode.ForEach(ReviewerForm())
601 pullrequest_title = v.UnicodeString(strip=True, required=True)
601 pullrequest_title = v.UnicodeString(strip=True, required=True, min=3, max=255)
602 pullrequest_desc = v.UnicodeString(strip=True, required=False)
602 pullrequest_desc = v.UnicodeString(strip=True, required=False)
603
603
604 return _PullRequestForm
604 return _PullRequestForm
General Comments 0
You need to be logged in to leave comments. Login now