getStatus

    Signature

    Helper nodeHelper
    Signature
    getStatus(String statusName)
    Description

    Returns a hub status with the provided name

    Example use

    Set the issue status to ready for incoming issues.

    issue.status = nodeHelper.getStatus("Ready")

    Note: Due to Github management system limitations, it is not possible to create an issue in any other state than Open. In this case, the getStatus will only apply during the update.

    Set issue status to Fixed if the remote issue status is Done and resolution is Fixed.

    def desiredStatusName
    if (replica.status?.name == "Done" && replica.resolution?.name == "Done") {
      desiredStatusName = "Fixed"
    }
    def desiredStatus = nodeHelper.getStatus(desiredStatusName)
    if (desiredStatus) {
      issue.status = desiredStatus
    }