async buildQueue()

in src/dal/weblinks.ts [30:64]


    async buildQueue(changeListId: string, buildConfig: BuildConfig): Promise<string> {
        if (!buildConfig) {
            return undefined;
        }
        const queueAtTop: boolean = buildConfig.shouldQueueAtTop();
        const credentials: Credentials = await this.credentialsStore.getCredentials();
        const url: string = `${credentials.serverURL}/app/rest/buildQueue`;
        const data = `<build personal="true">
                <triggered type='idePlugin' details='Visual Studio Code'/>
                <triggeringOptions cleanSources="false" rebuildAllDependencies="false" queueAtTop="${queueAtTop}"/>
                <buildType id="${buildConfig.externalId}"/>
                <lastChanges>
                    <change id="${changeListId}" personal="true"/>
                </lastChanges>
                <properties>
                    ${this.getPreparedProperties(buildConfig)}
                </properties>
            </build>`;
        return new Promise<string>((resolve, reject) => {
            request.post(
                {
                    uri: url
                    , headers: {
                    "Content-Type": "application/xml",
                    "User-Agent": this.vsCodeUtils.getUserAgentString()
                }, body: data
                },
                function (err, httpResponse, body) {
                    if (err) {
                        reject(err);
                    }
                    resolve(body);
                }).auth(credentials.user, credentials.password, false);
        });
    }