mirror of
https://github.com/github/codeql-action.git
synced 2026-10-03 17:41:28 +00:00
Remove name field from ComputedInput
This commit is contained in:
4
lib/entry-points.js
generated
4
lib/entry-points.js
generated
@@ -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 */
|
||||
};
|
||||
|
||||
@@ -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",
|
||||
};
|
||||
|
||||
@@ -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,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user