Add latest changes from gitlab-org/gitlab@master
This commit is contained in:
parent
442ab01ff6
commit
a7e65e2a32
4 changed files with 24 additions and 3 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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']`.
|
||||
|
|
|
@ -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);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue