Add latest changes from gitlab-org/gitlab@master

This commit is contained in:
GitLab Bot 2021-10-18 00:09:33 +00:00
parent 442ab01ff6
commit a7e65e2a32
4 changed files with 24 additions and 3 deletions

View file

@ -53,7 +53,7 @@ export default class IssuableForm {
// prettier-ignore
this.draftRegex = new RegExp(
'^\\s*(' + // Line start, then any amount of leading whitespace
'|\\[draft\\]\\s*' + // [Draft] and any following whitespace
'\\[draft\\]\\s*' + // [Draft] and any following whitespace
'|draft:\\s*' + // Draft: and any following whitespace
'|\\(draft\\)\\s*' + // (Draft) and any following whitespace
')+' + // At least one repeated match of the preceding parenthetical

View file

@ -71,7 +71,14 @@ module Issuable
# NOTE: CSV imports are performed by workers, so we do not have a request context in order
# to create a SpamParams object to pass to the issuable create service.
spam_params = nil
create_issuable_class.new(project: @project, current_user: @user, params: attributes, spam_params: spam_params).execute
create_service = create_issuable_class.new(project: @project, current_user: @user, params: attributes, spam_params: spam_params)
# For now, if create_issuable_class prepends RateLimitedService let's bypass rate limiting
if create_issuable_class < RateLimitedService
create_service.execute_without_rate_limiting
else
create_service.execute
end
end
def email_results_to_user

View file

@ -126,7 +126,7 @@ more information, see [the relevant issue](https://gitlab.com/gitlab-org/gitlab/
gitlab_rails['smartcard_client_certificate_required_port'] = 3444
```
NOTE: **Note**
NOTE:
Assign a value to at least one of the following variables:
`gitlab_rails['smartcard_client_certificate_required_host']` or
`gitlab_rails['smartcard_client_certificate_required_port']`.

View file

@ -45,4 +45,18 @@ describe('IssuableForm', () => {
expect(instance.titleField.val()).toBe("Draft: The Issuable's Title Value");
});
});
describe('workInProgress', () => {
it.each`
title | expected
${'draFT: something is happening'} | ${true}
${'draft something is happening'} | ${false}
${'something is happening to drafts'} | ${false}
${'something is happening'} | ${false}
`('returns $expected with "$title"', ({ title, expected }) => {
instance.titleField.val(title);
expect(instance.workInProgress()).toBe(expected);
});
});
});