Provide default config values for dependency-submission

This commit is contained in:
daz
2024-04-07 10:54:55 -06:00
parent cfd20ecc0a
commit b7ef93c7b7
4 changed files with 40 additions and 41 deletions

View File

@@ -6,7 +6,11 @@ import {SUMMARY_ENV_VAR} from '@actions/core/lib/summary'
import {parseArgsStringToArgv} from 'string-argv'
export class DependencyGraphConfig {
getDependencyGraphOption(): DependencyGraphOption {
dependencyGraphOption = this.getDependencyGraphOption()
continueOnFailure = this.getDependencyGraphContinueOnFailure()
artifactRetentionDays = this.getArtifactRetentionDays()
private getDependencyGraphOption(): DependencyGraphOption {
const val = core.getInput('dependency-graph')
switch (val.toLowerCase().trim()) {
case 'disabled':
@@ -27,11 +31,11 @@ export class DependencyGraphConfig {
)
}
getDependencyGraphContinueOnFailure(): boolean {
private getDependencyGraphContinueOnFailure(): boolean {
return getBooleanInput('dependency-graph-continue-on-failure', true)
}
getArtifactRetentionDays(): number {
private getArtifactRetentionDays(): number {
const val = core.getInput('artifact-retention-days')
return parseNumericInput('artifact-retention-days', val, 0)
// Zero indicates that the default repository settings should be used