Skip to content

Commit

Permalink
override org as an input
Browse files Browse the repository at this point in the history
  • Loading branch information
John Tracy committed Jun 5, 2020
1 parent f03d502 commit 07ea4f7
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 6 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ Refer [here](https://github.com/actions/checkout/blob/v1/README.md) for previous
```yaml
- uses: actions/checkout@v2
with:
# Repository name with owner. For example, actions/checkout
# Default: ${{ github.repository }}
# Repository name without owner, 'verily-src'. For example, actions/checkout
repository: ''

# The branch, tag or SHA to checkout. When checking out the repository that
Expand Down
3 changes: 1 addition & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ name: 'Checkout'
description: 'Checkout a Git repository at a particular version'
inputs:
repository:
description: 'Repository name with owner. For example, actions/checkout'
default: ${{ github.repository }}
description: "Repository name without owner, 'verily-src'. For example, actions/checkout"
ref:
description: >
The branch, tag or SHA to checkout. When checking out the repository that
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14074,7 +14074,7 @@ function getInputs() {
fsHelper.directoryExistsSync(githubWorkspacePath, true);
// Qualified repository
const qualifiedRepository = core.getInput('repository') ||
github.context.repo.repo.split('/')[1];
`${github.context.repo.repo}`;
core.debug(`qualified repository = '${qualifiedRepository}'`);
result.repositoryOwner = github.context.repo.owner;
result.repositoryName = qualifiedRepository;
Expand Down
2 changes: 1 addition & 1 deletion src/input-helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export function getInputs(): IGitSourceSettings {
// Qualified repository
const qualifiedRepository =
core.getInput('repository') ||
github.context.repo.repo.split('/')[1]
`${github.context.repo.repo}`
core.debug(`qualified repository = '${qualifiedRepository}'`)
result.repositoryOwner = github.context.repo.owner
result.repositoryName = qualifiedRepository
Expand Down

0 comments on commit 07ea4f7

Please sign in to comment.