Skip to content

Commit b1673a7

Browse files
committed
Add skip-commit-verification input
1 parent 29dc6db commit b1673a7

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

action.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ inputs:
1313
github-token:
1414
description: 'The GITHUB_TOKEN secret'
1515
default: ${{ github.token }}
16+
skip-commit-verification:
17+
type: boolean
18+
description: 'If true, the action will not expect Dependabot commits to be verified. This should be set as 'true' in GHES environments.'
19+
default: false
1620
outputs:
1721
dependency-names:
1822
description: 'A comma-separated list of all package names updated.'

src/main.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ beforeEach(() => {
1010
jest.spyOn(core, 'info').mockImplementation(jest.fn())
1111
jest.spyOn(core, 'setFailed').mockImplementation(jest.fn())
1212
jest.spyOn(core, 'startGroup').mockImplementation(jest.fn())
13+
jest.spyOn(core, 'getBooleanInput').mockReturnValue(false)
1314
})
1415

1516
test('it early exits with an error if github-token is not set', async () => {

src/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export async function run (): Promise<void> {
2222
const githubClient = github.getOctokit(token)
2323

2424
// Validate the job
25-
const commitMessage = await verifiedCommits.getMessage(githubClient, github.context)
25+
const commitMessage = await verifiedCommits.getMessage(githubClient, github.context, core.getBooleanInput('skip-commit-verification'))
2626
const branchNames = util.getBranchNames(github.context)
2727
let alertLookup: updateMetadata.alertLookup | undefined
2828
if (core.getInput('alert-lookup')) {

0 commit comments

Comments
 (0)