Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: peter-evans/dockerhub-description
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v4.0.1
Choose a base ref
...
head repository: peter-evans/dockerhub-description
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v4.0.2
Choose a head ref
  • 1 commit
  • 5 files changed
  • 1 contributor

Commits on Apr 3, 2025

  1. fix: revert fix enable-url-completion input (#310)

    peter-evans authored Apr 3, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    432a30c View commit details
Showing with 13 additions and 36 deletions.
  1. +0 −28 __test__/input-helper.unit.test.ts
  2. +0 −1 action.yml
  3. +7 −4 dist/index.js
  4. +5 −3 src/input-helper.ts
  5. +1 −0 src/readme-helper.ts
28 changes: 0 additions & 28 deletions __test__/input-helper.unit.test.ts

This file was deleted.

1 change: 0 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
@@ -22,7 +22,6 @@ inputs:
description: >
Enables completion of relative URLs to absolute ones
Default: `false`
default: "false"
image-extensions:
description: >
File extensions that will be treated as images
11 changes: 7 additions & 4 deletions dist/index.js
Original file line number Diff line number Diff line change
@@ -128,7 +128,7 @@ function getInputs() {
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')
};
// Environment variable input alternatives and their aliases
@@ -157,8 +157,7 @@ function getInputs() {
inputs.readmeFilepath = process.env['README_FILEPATH'];
}
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']) {
inputs.imageExtensions = process.env['IMAGE_EXTENSIONS'];
@@ -167,6 +166,9 @@ function getInputs() {
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;
}
@@ -311,12 +313,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
});
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.completeRelativeUrls = exports.getReadmeContent = exports.IMAGE_EXTENSIONS_DEFAULT = exports.README_FILEPATH_DEFAULT = void 0;
exports.completeRelativeUrls = exports.getReadmeContent = exports.ENABLE_URL_COMPLETION_DEFAULT = exports.IMAGE_EXTENSIONS_DEFAULT = exports.README_FILEPATH_DEFAULT = void 0;
const core = __importStar(__nccwpck_require__(7484));
const fs = __importStar(__nccwpck_require__(9896));
const utils = __importStar(__nccwpck_require__(9277));
exports.README_FILEPATH_DEFAULT = './README.md';
exports.IMAGE_EXTENSIONS_DEFAULT = 'bmp,gif,jpg,jpeg,png,svg,webp';
exports.ENABLE_URL_COMPLETION_DEFAULT = false;
const TITLE_REGEX = `(?: +"[^"]+")?`;
const REPOSITORY_URL = `${process.env['GITHUB_SERVER_URL']}/${process.env['GITHUB_REPOSITORY']}`;
const BLOB_PREFIX = `${REPOSITORY_URL}/blob/${process.env['GITHUB_REF_NAME']}/`;
8 changes: 5 additions & 3 deletions src/input-helper.ts
Original file line number Diff line number Diff line change
@@ -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
}
1 change: 1 addition & 0 deletions src/readme-helper.ts
Original file line number Diff line number Diff line change
@@ -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']}`