mirror of
https://github.com/tiennm99/is-a-dev.git
synced 2026-10-14 22:17:36 +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:
3 files changed
+7
-2
No files matched your search
@@ -59,6 +59,7 @@ describe('validateDomainData', () => {
|
|||||||
{ ...defaultDomain, name: 'ww2.baa' },
|
{ ...defaultDomain, name: 'ww2.baa' },
|
||||||
{ ...defaultDomain, name: 'help.baa' },
|
{ ...defaultDomain, name: 'help.baa' },
|
||||||
{ ...defaultDomain, name: '_github-pages-challenge-is-a-dev' },
|
{ ...defaultDomain, name: '_github-pages-challenge-is-a-dev' },
|
||||||
|
{ ...defaultDomain, name: '_github-challenge-is-a-dev' },
|
||||||
];
|
];
|
||||||
|
|
||||||
const validCases = [
|
const validCases = [
|
||||||
@@ -82,6 +83,9 @@ describe('validateDomainData', () => {
|
|||||||
{ ...defaultDomain, name: '_github-pages-challenge-phenax.akshay' },
|
{ ...defaultDomain, name: '_github-pages-challenge-phenax.akshay' },
|
||||||
{ ...defaultDomain, name: '_github-pages-challenge-hello01-ga' },
|
{ ...defaultDomain, name: '_github-pages-challenge-hello01-ga' },
|
||||||
{ ...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', () => {
|
it('should return false for invalid data', () => {
|
||||||
|
|||||||
@@ -12,5 +12,6 @@
|
|||||||
"ww2",
|
"ww2",
|
||||||
"ww3",
|
"ww3",
|
||||||
"ww4",
|
"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.compose(
|
||||||
R.all(or([
|
R.all(or([
|
||||||
and([
|
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,
|
checkRestrictedNames,
|
||||||
]),
|
]),
|
||||||
and([
|
and([
|
||||||
|
|||||||
Reference in new issue
Block a user