Remove unneeded apiDetails input to getApiClient
This commit is contained in:
parent
dac8912e9f
commit
9df773d1a3
45 changed files with 128 additions and 180 deletions
10
lib/feature-flags.js
generated
10
lib/feature-flags.js
generated
|
|
@ -63,8 +63,8 @@ exports.featureConfig = {
|
|||
* GitHub API is made to determine the enablement status.
|
||||
*/
|
||||
class Features {
|
||||
constructor(gitHubVersion, apiDetails, repositoryNwo, logger) {
|
||||
this.gitHubFeatureFlags = new GitHubFeatureFlags(gitHubVersion, apiDetails, repositoryNwo, logger);
|
||||
constructor(gitHubVersion, repositoryNwo, logger) {
|
||||
this.gitHubFeatureFlags = new GitHubFeatureFlags(gitHubVersion, repositoryNwo, logger);
|
||||
}
|
||||
/**
|
||||
*
|
||||
|
|
@ -108,9 +108,8 @@ class Features {
|
|||
}
|
||||
exports.Features = Features;
|
||||
class GitHubFeatureFlags {
|
||||
constructor(gitHubVersion, apiDetails, repositoryNwo, logger) {
|
||||
constructor(gitHubVersion, repositoryNwo, logger) {
|
||||
this.gitHubVersion = gitHubVersion;
|
||||
this.apiDetails = apiDetails;
|
||||
this.repositoryNwo = repositoryNwo;
|
||||
this.logger = logger;
|
||||
/**/
|
||||
|
|
@ -139,9 +138,8 @@ class GitHubFeatureFlags {
|
|||
this.logger.debug("Not running against github.com. Disabling all toggleable features.");
|
||||
return {};
|
||||
}
|
||||
const client = (0, api_client_1.getApiClient)(this.apiDetails);
|
||||
try {
|
||||
const response = await client.request("GET /repos/:owner/:repo/code-scanning/codeql-action/features", {
|
||||
const response = await (0, api_client_1.getApiClient)().request("GET /repos/:owner/:repo/code-scanning/codeql-action/features", {
|
||||
owner: this.repositoryNwo.owner,
|
||||
repo: this.repositoryNwo.repo,
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue