Options
All
  • Public
  • Public/Protected
  • All
Menu

Class TooManyAssigned

This Bot Action class analyzes the number of Merge Requests assigned to the assignee of the GitLab Merge Request and determines what, if any, feedback to provide to user.

Hierarchy

  • TooManyAssigned

Index

Properties

Static Readonly badNote

badNote: ":loudspeaker: You've assigned this merge request to someone who already has a lot on their plate.Reassigning the merge request to someone else will help it get approved more quickly" = `:loudspeaker: You've assigned this merge request to someone who already has a lot on their plate.Reassigning the merge request to someone else will help it get approved more quickly`

Static Readonly botActionName

botActionName: "TooManyAssigned" = "TooManyAssigned"

Static Readonly hashtag

hashtag: "[#TooManyAssignedAnalysis](https://github.com/Cigna/GitRDoneBot#4-too-many-assigned)" = `[#TooManyAssignedAnalysis](https://github.com/Cigna/GitRDoneBot#4-too-many-assigned)`

Methods

Static analyze

  • Parameters

    • state: string

      the state of the Merge Request: open, update, or merge

    • api: GitLabApi

      an instance of GitLabApi

    • customConfig: BotActionConfig

      an instance of BotActionConfig

    • assigneeId: number | null

      GitLab user id of Merge Request assignee

    Returns Promise<BotActionResponse>

    data about the success or failure of the GitLab API request and resulting properties calculated by Too Many Assigned analysis

Static buildSuccessfulAction

  • buildSuccessfulAction(state: string, goodGitPractice: boolean, assigneeId: number | null): SuccessfulBotAction
  • Invoked when Bot Action analysis was successful. Constructs a BotAction object containing goodGitPractice and conditional feedback message.

    Parameters

    • state: string

      the state of the Merge Request: open, update, or merge

    • goodGitPractice: boolean

      represents whether or not the Merge Request event meets the criteria for good Too Many Assigned practice

    • assigneeId: number | null

      the user ID of the person who is assigned to review this Merge Request

    Returns SuccessfulBotAction

    SuccessfulBotActionWithMessage instance containing feedback for user. If no feedback is warranted, an instance of SuccessfulBotActionWithNothingToSay is returned.

Static caseForBadMessage

  • caseForBadMessage(state: string, goodGitPractice: boolean, assigneeId: number | null): boolean

Generated using TypeDoc