mirror of
https://github.com/tiennm99/is-a-dev.git
synced 2026-05-20 03:26:09 +00:00
Merge pull request #3464 from is-a-dev/feature/github-org-verification
feat(validation): adds support for org github verification
This commit is contained in:
@@ -59,6 +59,7 @@ describe('validateDomainData', () => {
|
||||
{ ...defaultDomain, name: 'ww2.baa' },
|
||||
{ ...defaultDomain, name: 'help.baa' },
|
||||
{ ...defaultDomain, name: '_github-pages-challenge-is-a-dev' },
|
||||
{ ...defaultDomain, name: '_github-challenge-is-a-dev' },
|
||||
];
|
||||
|
||||
const validCases = [
|
||||
@@ -82,6 +83,9 @@ describe('validateDomainData', () => {
|
||||
{ ...defaultDomain, name: '_github-pages-challenge-phenax.akshay' },
|
||||
{ ...defaultDomain, name: '_github-pages-challenge-hello01-ga' },
|
||||
{ ...defaultDomain, name: '_github-pages-challenge-hello01_ga' },
|
||||
{ ...defaultDomain, name: '_github-challenge-phenax.akshay' },
|
||||
{ ...defaultDomain, name: '_github-challenge-hello01-ga' },
|
||||
{ ...defaultDomain, name: '_github-challenge-hello01_ga' },
|
||||
];
|
||||
|
||||
it('should return false for invalid data', () => {
|
||||
|
||||
@@ -12,5 +12,6 @@
|
||||
"ww2",
|
||||
"ww3",
|
||||
"ww4",
|
||||
"_github-pages-challenge-is-a-dev"
|
||||
"_github-pages-challenge-is-a-dev",
|
||||
"_github-challenge-is-a-dev"
|
||||
]
|
||||
|
||||
@@ -37,7 +37,7 @@ const validateDomainData = validate({
|
||||
R.compose(
|
||||
R.all(or([
|
||||
and([
|
||||
testRegex(/^_github-pages-challenge-[a-z0-9-_]+$/i), // Exception for github verification records
|
||||
testRegex(/^_github(-pages)?-challenge-[a-z0-9-_]+$/i), // Exception for github verification records
|
||||
checkRestrictedNames,
|
||||
]),
|
||||
and([
|
||||
|
||||
Reference in New Issue
Block a user