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 c032a46
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 5 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ Refer [here](https://github.com/actions/checkout/blob/v1/README.md) for previous
- uses: actions/checkout@v2
with:
# Repository name with owner. For example, actions/checkout
# Default: ${{ github.repository }}
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 @@ -3,7 +3,6 @@ description: 'Checkout a Git repository at a particular version'
inputs:
repository:
description: 'Repository name with owner. For example, actions/checkout'
default: ${{ github.repository }}
ref:
description: >
The branch, tag or SHA to checkout. When checking out the repository that
Expand All @@ -21,7 +20,7 @@ inputs:
[Learn more about creating and using encrypted secrets](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/creating-and-using-encrypted-secrets)
default: ${{ github.token }}
default: ${{ secrets.GH_READ_TOKEN }}
ssh-key:
description: >
SSH key used to fetch the repository. The SSH key is configured with the local
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 c032a46

Please sign in to comment.