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:
Akshay Nair
2022-09-14 12:43:07 +05:30
committed by GitHub
3 changed files with 7 additions and 2 deletions
+4
View File
@@ -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', () => {
+2 -1
View File
@@ -12,5 +12,6 @@
"ww2",
"ww3",
"ww4",
"_github-pages-challenge-is-a-dev"
"_github-pages-challenge-is-a-dev",
"_github-challenge-is-a-dev"
]
+1 -1
View File
@@ -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([