removed subpath check
Some checks failed
Build and Test / build (push) Has been cancelled
Build and Test / test (macos-latest) (push) Has been cancelled
Build and Test / test (ubuntu-latest) (push) Has been cancelled
Build and Test / test (windows-latest) (push) Has been cancelled
Build and Test / test-proxy (push) Has been cancelled
Build and Test / test-bypass-proxy (push) Has been cancelled
Build and Test / test-git-container (push) Has been cancelled
Licensed / Check licenses (push) Has been cancelled
CodeQL / Analyze (javascript) (push) Has been cancelled
Check dist / check-dist (push) Has been cancelled

This commit is contained in:
Michael Schmidt
2023-07-18 07:27:41 +02:00
parent 7b256c6763
commit f4c387e22b
2 changed files with 18 additions and 22 deletions

View File

@@ -23,20 +23,15 @@ export async function getInputs(): Promise<IGitSourceSettings> {
`${github.context.repo.owner}/${github.context.repo.repo}`
core.debug(`qualified repository = '${qualifiedRepository}'`)
const splitRepository = qualifiedRepository.split('/')
core.info(splitRepository.toString())
if(splitRepository.length === 3) {
splitRepository.shift()
}
if (
splitRepository.length !== 2 ||
!splitRepository[0] ||
!splitRepository[1]
) {
throw new Error(
`Invalid repository '${qualifiedRepository}'. Expected format {owner}/{repo}.`
)
}
// if (
// splitRepository.length !== 2 ||
// !splitRepository[0] ||
// !splitRepository[1]
// ) {
// throw new Error(
// `Invalid repository '${qualifiedRepository}'. Expected format {owner}/{repo}.`
// )
// }
result.repositoryOwner = splitRepository[0]
result.repositoryName = splitRepository[1]