mirror of
https://github.com/github/codeql-action.git
synced 2026-04-27 17:39:15 +00:00
Fix using keys instead of values
Also add `logger.debug` call with keys from API response
This commit is contained in:
@@ -50,7 +50,11 @@ export async function loadPropertiesFromApi(
|
||||
);
|
||||
}
|
||||
|
||||
const knownProperties = new Set(Object.keys(RepositoryPropertyName));
|
||||
logger.debug(
|
||||
`Retrieved ${remoteProperties.length} repository properties: ${remoteProperties.map((p) => p.property_name).join(", ")}`,
|
||||
);
|
||||
|
||||
const knownProperties = new Set(Object.values(RepositoryPropertyName));
|
||||
const properties: RepositoryProperties = {};
|
||||
for (const property of remoteProperties) {
|
||||
if (property.property_name === undefined) {
|
||||
@@ -59,7 +63,9 @@ export async function loadPropertiesFromApi(
|
||||
);
|
||||
}
|
||||
|
||||
if (knownProperties.has(property.property_name)) {
|
||||
if (
|
||||
knownProperties.has(property.property_name as RepositoryPropertyName)
|
||||
) {
|
||||
properties[property.property_name] = property.value;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user