mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
fix(Github Node): Modify regex validation to support custom urls (#19076)
This commit is contained in:
@@ -517,13 +517,13 @@ export class Github implements INodeType {
|
||||
placeholder: 'e.g. https://github.com/n8n-io',
|
||||
extractValue: {
|
||||
type: 'regex',
|
||||
regex: 'https:\\/\\/github.com\\/([-_0-9a-zA-Z]+)',
|
||||
regex: 'https:\\/\\/(?:[^/]+)\\/([-_0-9a-zA-Z]+)',
|
||||
},
|
||||
validation: [
|
||||
{
|
||||
type: 'regex',
|
||||
properties: {
|
||||
regex: 'https:\\/\\/github.com\\/([-_0-9a-zA-Z]+)(?:.*)',
|
||||
regex: 'https:\\/\\/([^/]+)\\/([-_0-9a-zA-Z]+)(?:.*)',
|
||||
errorMessage: 'Not a valid Github URL',
|
||||
},
|
||||
},
|
||||
@@ -579,13 +579,13 @@ export class Github implements INodeType {
|
||||
placeholder: 'e.g. https://github.com/n8n-io/n8n',
|
||||
extractValue: {
|
||||
type: 'regex',
|
||||
regex: 'https:\\/\\/github.com\\/(?:[-_0-9a-zA-Z]+)\\/([-_.0-9a-zA-Z]+)',
|
||||
regex: 'https:\\/\\/(?:[^/]+)\\/(?:[-_0-9a-zA-Z]+)\\/([-_.0-9a-zA-Z]+)',
|
||||
},
|
||||
validation: [
|
||||
{
|
||||
type: 'regex',
|
||||
properties: {
|
||||
regex: 'https:\\/\\/github.com\\/(?:[-_0-9a-zA-Z]+)\\/([-_.0-9a-zA-Z]+)(?:.*)',
|
||||
regex: 'https:\\/\\/([^/]+)\\/(?:[-_0-9a-zA-Z]+)\\/([-_.0-9a-zA-Z]+)(?:.*)',
|
||||
errorMessage: 'Not a valid Github Repository URL',
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user