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

feature: add support for commit input (fixes #1634) #1858

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Prev Previous commit
Next Next commit
format input-helper
Signed-off-by: James Bradlee <james.bradlee@telenor.no>
  • Loading branch information
testersen committed Aug 20, 2024
commit 491fae084d7f74ef16e3a7a58a0cdd16edbeb5bf
12 changes: 9 additions & 3 deletions __test__/input-helper.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,9 @@ describe('input-helper tests', () => {
expect(settings.ref).toBeTruthy()
expect(settings.ref).toStrictEqual('refs/pull/123/merge')
expect(settings.commit).toBeTruthy()
expect(settings.commit).toStrictEqual('0123456789012345678901234567890123456789')
expect(settings.commit).toStrictEqual(
'0123456789012345678901234567890123456789'
)
})

it('ref fallbacks to commit if ref is empty but commit is specified', async () => {
Expand All @@ -162,8 +164,12 @@ describe('input-helper tests', () => {
const settings: IGitSourceSettings = await inputHelper.getInputs()
expect(settings).toBeTruthy()
expect(settings.ref).toBeTruthy()
expect(settings.ref).toStrictEqual('0123456789012345678901234567890123456789')
expect(settings.ref).toStrictEqual(
'0123456789012345678901234567890123456789'
)
expect(settings.commit).toBeTruthy()
expect(settings.commit).toStrictEqual('0123456789012345678901234567890123456789')
expect(settings.commit).toStrictEqual(
'0123456789012345678901234567890123456789'
)
})
})