mirror of
https://github.com/github/codeql-action.git
synced 2026-05-08 23:00:26 +00:00
Track outcomes of querying FFs with getValue
This commit is contained in:
Generated
+11
@@ -86995,6 +86995,12 @@ var Features = class {
|
||||
);
|
||||
}
|
||||
gitHubFeatureFlags;
|
||||
// Tracks features that have been queried at some point and the outcome.
|
||||
queriedFeatures = {};
|
||||
/** Gets a record of features that were queried and the corresponding outcomes. */
|
||||
getQueriedFeatures() {
|
||||
return this.queriedFeatures;
|
||||
}
|
||||
async getDefaultCliVersion(variant) {
|
||||
return await this.gitHubFeatureFlags.getDefaultCliVersion(variant);
|
||||
}
|
||||
@@ -87011,6 +87017,11 @@ var Features = class {
|
||||
* @throws if a `minimumVersion` is specified for the feature, and `codeql` is not provided.
|
||||
*/
|
||||
async getValue(feature, codeql) {
|
||||
const value = await this.getValueInternal(feature, codeql);
|
||||
this.queriedFeatures[feature] = { value };
|
||||
return value;
|
||||
}
|
||||
async getValueInternal(feature, codeql) {
|
||||
const config = featureConfig[feature];
|
||||
if (!codeql && config.minimumVersion) {
|
||||
throw new Error(
|
||||
|
||||
Reference in New Issue
Block a user