Class RequiredSecretsDetector
Detects required environment variables from build scripts.
public class RequiredSecretsDetector : IRequiredSecretsDetector
- Inheritance
-
RequiredSecretsDetector
- Implements
- Inherited Members
Constructors
RequiredSecretsDetector(IGitHubService, ILogger<RequiredSecretsDetector>)
public RequiredSecretsDetector(IGitHubService gitHubService, ILogger<RequiredSecretsDetector> logger)
Parameters
gitHubServiceIGitHubServiceloggerILogger<RequiredSecretsDetector>
Methods
DetectRequiredSecretsAsync(long, string, string?)
Detects required environment variables from a repository's build script.
public Task<IReadOnlyList<string>> DetectRequiredSecretsAsync(long installationId, string repoFullName, string? branch = null)
Parameters
installationIdlongGitHub App installation ID.
repoFullNamestringRepository full name (owner/repo).
branchstringBranch to read from (optional, uses default branch if null).
Returns
- Task<IReadOnlyList<string>>
List of detected required environment variable names.
ParseRequiredSecrets(string)
Detects required environment variables from build script content.
public IReadOnlyList<string> ParseRequiredSecrets(string scriptContent)
Parameters
scriptContentstringThe content of a build.csando file.
Returns
- IReadOnlyList<string>
List of detected required environment variable names.