Options
All
  • Public
  • Public/Protected
  • All
Menu

Class CustomConfig

This class contains the logic for retrieving the user-defined .grdb.json Custom Config file and using those values if valid, or default values if user-defined values are invalid or missing.

Hierarchy

  • CustomConfig

Index

Constructors

constructor

Properties

Readonly apiResponse

apiResponse: GetResponse

Readonly branchAge

branchAge: BotActionConfig

Readonly commitMessage

commitMessage: BotActionConfig

Readonly diffSize

diffSize: BotActionConfig

Readonly tooManyMergeRequests

tooManyMergeRequests: BotActionConfig

Readonly updateMergeRequestComment

updateMergeRequestComment: boolean

Methods

Static from

  • Loads in user-configured values for all valid config properties & property thresholds if api call is successful. If api call fails, or for any invalid user-configured values, uses default values.

    Parameters

    • api: GitLabApi

      an instance of the GitLabApi class that wraps HTTP requests to and responses from the GitLab API

    Returns Promise<CustomConfig>

    CustomConfig with loaded values

Static getUpdateConfig

  • getUpdateConfig(retrievedConfig: any): boolean
  • Determine if user-configured value for updateMergeRequestComment is set and valid, or if default value should be used

    Parameters

    • retrievedConfig: any

      user-configured bot action values

    Returns boolean

    boolean for updateMergeRequestComment in CustomConfig

Generated using TypeDoc