GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Only emit one message with accumulated property names · github/codeql-action@b4937c1

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • lib
    • init-action.js
  • src/feature-flags
    • properties.test.ts
    • properties.ts
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎lib/init-action.js‎

Copy file name to clipboardExpand all lines: lib/init-action.js
+8-3Lines changed: 8 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Collapse file

‎src/feature-flags/properties.test.ts‎

Copy file name to clipboardExpand all lines: src/feature-flags/properties.test.ts
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ test.serial(
227227
warningSpy.firstCall.args[0]
228228
.toString()
229229
.startsWith(
230-
`Found a repository property named '${propertyName}', which looks like a CodeQL Action repository property`,
230+
`Found repository properties ('${propertyName}'), which look like CodeQL Action repository properties`,
231231
),
232232
);
233233
},
Collapse file

‎src/feature-flags/properties.ts‎

Copy file name to clipboardExpand all lines: src/feature-flags/properties.ts
+17-6Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,8 @@ export async function loadPropertiesFromApi(
118118
);
119119

120120
const properties: RepositoryProperties = {};
121+
const unrecognisedProperties: string[] = [];
122+
121123
for (const property of remoteProperties) {
122124
if (property.property_name === undefined) {
123125
throw new Error(
@@ -131,12 +133,7 @@ export async function loadPropertiesFromApi(
131133
property.property_name.startsWith(GITHUB_CODEQL_PROPERTY_PREFIX) &&
132134
!isDynamicWorkflow()
133135
) {
134-
logger.warning(
135-
`Found a repository property named '${property.property_name}', ` +
136-
"which looks like a CodeQL Action repository property, " +
137-
"but which is not understood by this version of the CodeQL Action. " +
138-
"Do you need to update to a newer version?",
139-
);
136+
unrecognisedProperties.push(property.property_name);
140137
}
141138
}
142139

@@ -153,6 +150,20 @@ export async function loadPropertiesFromApi(
153150
}
154151
}
155152

153+
// Emit a warning if we encountered unrecognised properties that have our prefix.
154+
if (unrecognisedProperties.length > 0) {
155+
const unrecognisedPropertyList = unrecognisedProperties
156+
.map((name) => `'${name}'`)
157+
.join(", ");
158+
159+
logger.warning(
160+
`Found repository properties (${unrecognisedPropertyList}), ` +
161+
"which look like CodeQL Action repository properties, " +
162+
"but which are not understood by this version of the CodeQL Action. " +
163+
"Do you need to update to a newer version?",
164+
);
165+
}
166+
156167
return properties;
157168
} catch (e) {
158169
throw new Error(

0 commit comments

Comments
0 (0)
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.