Skip to content

Commit

Permalink
Override the org
Browse files Browse the repository at this point in the history
  • Loading branch information
John Tracy committed Jun 5, 2020
1 parent fca39da commit 0447090
Showing 1 changed file with 4 additions and 14 deletions.
18 changes: 4 additions & 14 deletions src/input-helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,11 @@ export function getInputs(): IGitSourceSettings {
// Qualified repository
const qualifiedRepository =
core.getInput('repository') ||
`${github.context.repo.owner}/${github.context.repo.repo}`
`${github.context.repo.repo}`
core.debug(`qualified repository = '${qualifiedRepository}'`)
const splitRepository = qualifiedRepository.split('/')
if (
splitRepository.length !== 2 ||
!splitRepository[0] ||
!splitRepository[1] ||
splitRepository[0] != github.context.repo.owner
) {
throw new Error(
`Invalid repository '${qualifiedRepository}'. Expected format ${github.context.repo.owner}/{repo}.`
)
}
result.repositoryOwner = splitRepository[0]
result.repositoryName = splitRepository[1]

result.repositoryOwner = github.context.repo.owner
result.repositoryName = qualifiedRepository

// Repository path
result.repositoryPath = core.getInput('path') || '.'
Expand Down

0 comments on commit 0447090

Please sign in to comment.