Leo Lamprecht
8 years ago
No known key found for this signature in database
GPG Key ID: B08517883D5E0E10
2 changed files with
3 additions and
3 deletions
-
bin/now-deploy.js
-
lib/github.js
|
|
@ -229,7 +229,7 @@ async function sync(token) { |
|
|
|
// once the deployment has finished
|
|
|
|
Object.assign(gitHubRepo, repo) |
|
|
|
} else if (isValidRepo === 'no-valid-url') { |
|
|
|
stopDeployment(`URL is no valid repository from GitHub or GitLab.`) |
|
|
|
stopDeployment(`This URL is not a valid repository from GitHub or GitLab.`) |
|
|
|
} else if (isValidRepo) { |
|
|
|
const gitRef = gitHubRepo.ref ? `with "${chalk.bold(gitHubRepo.ref)}" ` : '' |
|
|
|
stopDeployment(`There's no repository named "${chalk.bold(gitHubRepo.main)}" ${gitRef}on GitHub or GitLab`) |
|
|
|
|
|
@ -90,8 +90,8 @@ export const isRepoPath = path => { |
|
|
|
|
|
|
|
if (isURL(path)) { |
|
|
|
const urlParts = url.parse(path) |
|
|
|
const slashCount = (urlParts.path.match(new RegExp('/', 'g')) || []).length |
|
|
|
const notBare = slashCount >= 2 |
|
|
|
const slashSplitted = urlParts.path.split('/').filter(n => n) |
|
|
|
const notBare = slashSplitted.length >= 2 |
|
|
|
|
|
|
|
if (allowedHosts.includes(urlParts.host) && notBare) { |
|
|
|
return true |
|
|
|