@@ -128,7 +128,7 @@ function getInputs() {
128
128
repository: core.getInput('repository'),
129
129
shortDescription: core.getInput('short-description'),
130
130
readmeFilepath: core.getInput('readme-filepath'),
131
- enableUrlCompletion: core.getBooleanInput ('enable-url-completion'),
131
+ enableUrlCompletion: Boolean( core.getInput ('enable-url-completion') ),
132
132
imageExtensions: core.getInput('image-extensions')
133
133
};
134
134
// Environment variable input alternatives and their aliases
@@ -157,8 +157,7 @@ function getInputs() {
157
157
inputs.readmeFilepath = process.env['README_FILEPATH'];
158
158
}
159
159
if (!inputs.enableUrlCompletion && process.env['ENABLE_URL_COMPLETION']) {
160
- inputs.enableUrlCompletion =
161
- process.env['ENABLE_URL_COMPLETION'].toLowerCase() === 'true';
160
+ inputs.enableUrlCompletion = Boolean(process.env['ENABLE_URL_COMPLETION']);
162
161
}
163
162
if (!inputs.imageExtensions && process.env['IMAGE_EXTENSIONS']) {
164
163
inputs.imageExtensions = process.env['IMAGE_EXTENSIONS'];
@@ -167,6 +166,9 @@ function getInputs() {
167
166
if (!inputs.readmeFilepath) {
168
167
inputs.readmeFilepath = readmeHelper.README_FILEPATH_DEFAULT;
169
168
}
169
+ if (!inputs.enableUrlCompletion) {
170
+ inputs.enableUrlCompletion = readmeHelper.ENABLE_URL_COMPLETION_DEFAULT;
171
+ }
170
172
if (!inputs.imageExtensions) {
171
173
inputs.imageExtensions = readmeHelper.IMAGE_EXTENSIONS_DEFAULT;
172
174
}
@@ -311,12 +313,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
311
313
});
312
314
};
313
315
Object.defineProperty(exports, "__esModule", ({ value: true }));
314
- exports.completeRelativeUrls = exports.getReadmeContent = exports.IMAGE_EXTENSIONS_DEFAULT = exports.README_FILEPATH_DEFAULT = void 0;
316
+ exports.completeRelativeUrls = exports.getReadmeContent = exports.ENABLE_URL_COMPLETION_DEFAULT = exports. IMAGE_EXTENSIONS_DEFAULT = exports.README_FILEPATH_DEFAULT = void 0;
315
317
const core = __importStar(__nccwpck_require__(7484));
316
318
const fs = __importStar(__nccwpck_require__(9896));
317
319
const utils = __importStar(__nccwpck_require__(9277));
318
320
exports.README_FILEPATH_DEFAULT = './README.md';
319
321
exports.IMAGE_EXTENSIONS_DEFAULT = 'bmp,gif,jpg,jpeg,png,svg,webp';
322
+ exports.ENABLE_URL_COMPLETION_DEFAULT = false;
320
323
const TITLE_REGEX = `(?: +"[^"]+")?`;
321
324
const REPOSITORY_URL = `${process.env['GITHUB_SERVER_URL']}/${process.env['GITHUB_REPOSITORY']}`;
322
325
const BLOB_PREFIX = `${REPOSITORY_URL}/blob/${process.env['GITHUB_REF_NAME']}/`;
0 commit comments