Skip to content

Commit

Permalink
feat: Allow configurable resultsPerPage in Gradle plugin (#399)
Browse files Browse the repository at this point in the history
  • Loading branch information
aikebah authored Jul 27, 2024
1 parent c6928c1 commit aa6e9d0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ class NvdExtension {
* The number of milliseconds to wait between calls to the NVD API.
*/
Integer delay
/**
* The number records for a single page from NVD API (must be <=2000).
*/
Integer resultsPerPage
/**
* The maximum number of retry requests for a single call to the NVD API.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ abstract class ConfiguredTask extends DefaultTask {
settings.setStringIfNotEmpty(NVD_API_KEY, config.nvd.apiKey)
settings.setStringIfNotEmpty(NVD_API_ENDPOINT, config.nvd.endpoint)
settings.setIntIfNotNull(NVD_API_DELAY, config.nvd.delay)
settings.setIntIfNotNull(NVD_API_RESULTS_PER_PAGE, config.nvd.resultsPerPage)
settings.setIntIfNotNull(NVD_API_MAX_RETRY_COUNT, config.nvd.maxRetryCount)
settings.setIntIfNotNull(NVD_API_VALID_FOR_HOURS, config.nvd.validForHours);

Expand Down

0 comments on commit aa6e9d0

Please sign in to comment.