async getBuildStatuses()

in src/app/teamcity/teamcity-service.js [29:55]


  async getBuildStatuses(teamcityService, project, buildTypes, hideChildProjects) {
    let locator;
    if (buildTypes.length > 0) {
      locator = buildTypes.map(it => `item(id:${it.id})`).join(',');
    } else if (hideChildProjects) {
      locator = `project:(id:${project.id})`;
    } else {
      locator = `affectedProject:(id:${project.id}),project:(archived:false)`;
    }

    return await this._fetchTeamcity(teamcityService, 'buildTypes', {
      locator,
      fields: 'count,nextHref,buildType(' +
        'id,webUrl,name,' +
        'builds(' +
        '$locator:(running:false,canceled:false,count:1),' +
        'build(number,webUrl,startDate,finishDate,status,statusText)' +
        '),' +
        'investigations(investigation(state,' +
        'assignee(name,username),' +
        'assignment(user(name,username),timestamp,text),' +
        'resolution(type))' +
        '),' +
        'project(archived,id,name)' +
        ')'
    });
  }