mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-16 17:46:45 +00:00
fix(editor): Allow custom git repo urls in source control settings (#10849)
This commit is contained in:
@@ -170,6 +170,8 @@ describe('SettingsSourceControl', () => {
|
||||
['git@192.168.1.101:2222:user/repo', true],
|
||||
['git@ssh.dev.azure.com:v3/User/repo/directory', true],
|
||||
['ssh://git@mydomain.example:2224/gitolite-admin', true],
|
||||
['gituser@192.168.1.1:ABC/Repo4.git', true],
|
||||
['root@192.168.1.1/repo.git', true],
|
||||
['http://github.com/user/repository', false],
|
||||
['https://github.com/user/repository', false],
|
||||
])('%s', async (url: string, isValid: boolean) => {
|
||||
@@ -131,7 +131,7 @@ const repoUrlValidationRules: Array<Rule | RuleGroup> = [
|
||||
name: 'MATCH_REGEX',
|
||||
config: {
|
||||
regex:
|
||||
/^(ssh:\/\/)?git@(?:\[[0-9a-fA-F:]+\]|(?:[a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+)(?::[0-9]+)*:(?:v[0-9]+\/)?[a-zA-Z0-9_.\-\/]+(\.git)?(?:\/[a-zA-Z0-9_.\-\/]+)*$/,
|
||||
/^(?:git@|ssh:\/\/git@|[\w-]+@)(?:[\w.-]+|\[[0-9a-fA-F:]+])(?::\d+)?[:\/][\w\-~]+(?:\/[\w\-~]+)*(?:\.git)?(?:\/.*)?$/,
|
||||
message: locale.baseText('settings.sourceControl.repoUrlInvalid'),
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user