Remove name field from ComputedInput

This commit is contained in:
Michael B. Gale
2026-07-24 14:27:08 +01:00
parent b060f9d53c
commit f170b3a321
3 changed files with 2 additions and 10 deletions

4
lib/entry-points.js generated
View File

@@ -160356,7 +160356,6 @@ async function getToolsInput(action, repositoryProperties) {
`Using ${name} input from repository property (enforced): ${propertyValue}`
);
return {
name,
// Drop the '!' from the value.
value: propertyValue.substring(1),
source: "repository-property" /* RepositoryProperty */
@@ -160364,14 +160363,13 @@ async function getToolsInput(action, repositoryProperties) {
}
if (input !== void 0) {
action.logger.info(`Using ${name} input from workflow: ${input}`);
return { name, value: input, source: "workflow" /* Workflow */ };
return { value: input, source: "workflow" /* Workflow */ };
}
if (allowRepositoryProperty && propertyValue !== void 0) {
action.logger.info(
`Using ${name} input from repository property: ${propertyValue}`
);
return {
name,
value: propertyValue,
source: "repository-property" /* RepositoryProperty */
};

View File

@@ -13,13 +13,11 @@ test("getToolsInput - undefined if there's no input", async (t) => {
});
const expectedWorkflowResult: ComputedInput = {
name: InputName.Tools,
source: InputSource.Workflow,
value: "workflow-input-value",
};
const expectedRepositoryPropertyResult: ComputedInput = {
name: InputName.Tools,
source: InputSource.RepositoryProperty,
value: "repo-property-input-value",
};

View File

@@ -21,8 +21,6 @@ export enum InputSource {
* the input value that was computed or selected from multiple sources.
*/
export type ComputedInput = {
/** The name of the property. */
name: InputName;
/** The value of the property. */
value: string;
/** The source of the property. */
@@ -54,7 +52,6 @@ export async function getToolsInput(
`Using ${name} input from repository property (enforced): ${propertyValue}`,
);
return {
name,
// Drop the '!' from the value.
value: propertyValue.substring(1),
source: InputSource.RepositoryProperty,
@@ -64,7 +61,7 @@ export async function getToolsInput(
// Otherwise, the input from the workflow takes precedence.
if (input !== undefined) {
action.logger.info(`Using ${name} input from workflow: ${input}`);
return { name, value: input, source: InputSource.Workflow };
return { value: input, source: InputSource.Workflow };
}
// Use the repository property if there's no workflow input.
@@ -73,7 +70,6 @@ export async function getToolsInput(
`Using ${name} input from repository property: ${propertyValue}`,
);
return {
name,
value: propertyValue,
source: InputSource.RepositoryProperty,
};