fix: revert fix enable-url-completion input (#310)
Some checks failed
Publish Docker Image / publish (push) Has been cancelled

This commit is contained in:
Peter Evans
2025-04-03 08:46:49 +01:00
committed by GitHub
parent 0505d8b048
commit 432a30c9e0
5 changed files with 13 additions and 36 deletions

View File

@@ -18,7 +18,7 @@ export function getInputs(): Inputs {
repository: core.getInput('repository'),
shortDescription: core.getInput('short-description'),
readmeFilepath: core.getInput('readme-filepath'),
enableUrlCompletion: core.getBooleanInput('enable-url-completion'),
enableUrlCompletion: Boolean(core.getInput('enable-url-completion')),
imageExtensions: core.getInput('image-extensions')
}
@@ -54,8 +54,7 @@ export function getInputs(): Inputs {
}
if (!inputs.enableUrlCompletion && process.env['ENABLE_URL_COMPLETION']) {
inputs.enableUrlCompletion =
process.env['ENABLE_URL_COMPLETION'].toLowerCase() === 'true'
inputs.enableUrlCompletion = Boolean(process.env['ENABLE_URL_COMPLETION'])
}
if (!inputs.imageExtensions && process.env['IMAGE_EXTENSIONS']) {
@@ -66,6 +65,9 @@ export function getInputs(): Inputs {
if (!inputs.readmeFilepath) {
inputs.readmeFilepath = readmeHelper.README_FILEPATH_DEFAULT
}
if (!inputs.enableUrlCompletion) {
inputs.enableUrlCompletion = readmeHelper.ENABLE_URL_COMPLETION_DEFAULT
}
if (!inputs.imageExtensions) {
inputs.imageExtensions = readmeHelper.IMAGE_EXTENSIONS_DEFAULT
}

View File

@@ -4,6 +4,7 @@ import * as utils from './utils'
export const README_FILEPATH_DEFAULT = './README.md'
export const IMAGE_EXTENSIONS_DEFAULT = 'bmp,gif,jpg,jpeg,png,svg,webp'
export const ENABLE_URL_COMPLETION_DEFAULT = false
const TITLE_REGEX = `(?: +"[^"]+")?`
const REPOSITORY_URL = `${process.env['GITHUB_SERVER_URL']}/${process.env['GITHUB_REPOSITORY']}`