Add skip-commit-verification input

This commit is contained in:
Barry Gordon
2022-06-30 14:36:01 +01:00
parent 29dc6db06e
commit b1673a77b4
3 changed files with 6 additions and 1 deletions

View File

@@ -13,6 +13,10 @@ inputs:
github-token:
description: 'The GITHUB_TOKEN secret'
default: ${{ github.token }}
skip-commit-verification:
type: boolean
description: 'If true, the action will not expect Dependabot commits to be verified. This should be set as 'true' in GHES environments.'
default: false
outputs:
dependency-names:
description: 'A comma-separated list of all package names updated.'

View File

@@ -10,6 +10,7 @@ beforeEach(() => {
jest.spyOn(core, 'info').mockImplementation(jest.fn())
jest.spyOn(core, 'setFailed').mockImplementation(jest.fn())
jest.spyOn(core, 'startGroup').mockImplementation(jest.fn())
jest.spyOn(core, 'getBooleanInput').mockReturnValue(false)
})
test('it early exits with an error if github-token is not set', async () => {

View File

@@ -22,7 +22,7 @@ export async function run (): Promise<void> {
const githubClient = github.getOctokit(token)
// Validate the job
const commitMessage = await verifiedCommits.getMessage(githubClient, github.context)
const commitMessage = await verifiedCommits.getMessage(githubClient, github.context, core.getBooleanInput('skip-commit-verification'))
const branchNames = util.getBranchNames(github.context)
let alertLookup: updateMetadata.alertLookup | undefined
if (core.getInput('alert-lookup')) {