Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default branch checkout option #1615

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Add a test
  • Loading branch information
alexanderkranga committed Feb 19, 2024
commit 6b8be4cb30971d494e7d481a90a251d3b74355d7
1 change: 1 addition & 0 deletions __test__/input-helper.test.ts
Original file line number Diff line number Diff line change
@@ -80,6 +80,7 @@ describe('input-helper tests', () => {
expect(settings.commit).toBeTruthy()
expect(settings.commit).toBe('1234567890123456789012345678901234567890')
expect(settings.filter).toBe(undefined)
expect(settings.defaultBranchCheckout).toBe(false)
expect(settings.sparseCheckout).toBe(undefined)
expect(settings.sparseCheckoutConeMode).toBe(true)
expect(settings.fetchDepth).toBe(1)
2 changes: 1 addition & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
@@ -1741,7 +1741,7 @@ function getInputs() {
core.debug(`commit = '${result.commit}'`);
// Default branch checkout
result.defaultBranchCheckout =
(core.getInput('default-branch-checkout') || 'true').toUpperCase() ===
(core.getInput('default-branch-checkout') || 'false').toUpperCase() ===
'TRUE';
core.debug(`default-branch-checkout = '${result.defaultBranchCheckout}'`);
// Clean
2 changes: 1 addition & 1 deletion src/input-helper.ts
Original file line number Diff line number Diff line change
@@ -80,7 +80,7 @@ export async function getInputs(): Promise<IGitSourceSettings> {

// Default branch checkout
result.defaultBranchCheckout =
(core.getInput('default-branch-checkout') || 'true').toUpperCase() ===
(core.getInput('default-branch-checkout') || 'false').toUpperCase() ===
'TRUE'
core.debug(`default-branch-checkout = '${result.defaultBranchCheckout}'`)