From ca7440bb09327beef1b3de76bd12fc36acfca45a Mon Sep 17 00:00:00 2001 From: Michel Kaporin Date: Tue, 20 Jun 2017 09:37:49 +0200 Subject: [PATCH] Documentation update, added typing and grouped build def description change. --- README.md | 9 +++++++++ src/settings.ts | 4 ++-- src/vstsbuildstatus.ts | 2 +- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index bb55f29..545ba2d 100644 --- a/README.md +++ b/README.md @@ -28,5 +28,14 @@ The extension is enabled by providing the following settings (user or workspace) } ``` +It also allows to add several build definitions grouped into one status bar indicator. It could be helpful if you trigger multiple builds which overall result is success only if all builds are passing (e.g. when running multiple build definitions on the same code base cross-platform). To enable grouped build definitions, add the following configuration in addition to the one at the top: + +```json +{ + "vsts.definitionsGroup": "1,2,3", // IDs of build definitions to be grouped, separated with a comma + "vsts.definitionsGroupName": "My Grouped Builds", // Name of the grouped build definitions +} +``` + ## License MIT, please see LICENSE for details. Copyright (c) 2016 Jeppe Andersen. \ No newline at end of file diff --git a/src/settings.ts b/src/settings.ts index 8082c4c..4305ae6 100644 --- a/src/settings.ts +++ b/src/settings.ts @@ -118,12 +118,12 @@ export class WorkspaceVstsSettings implements Settings { if (definitionsGroup) { const buildIds = definitionsGroup.split(',').map(id => parseInt(id)); - let defList = []; + let defList: BuildDefinition[] = []; buildIds.forEach(id => { defList.push({ id: id, name: this.definitionsGroupName, - revision: 0 + revision: undefined }); }); this.definitionsGroup = defList; diff --git a/src/vstsbuildstatus.ts b/src/vstsbuildstatus.ts index 6c4d4fc..4b66e51 100644 --- a/src/vstsbuildstatus.ts +++ b/src/vstsbuildstatus.ts @@ -209,7 +209,7 @@ export class VstsBuildStatus { if (this.settings.definitionsGroup) { buildDefinitions.push({ label: this.settings.definitionsGroupName ? this.settings.definitionsGroupName : this.settings.definitionsGroup.map(b => b.id.toString()).join(','), - description: 'Grouped Build Definitions', + description: 'Grouped Build Definition', ids: this.settings.definitionsGroup.map(b => b.id), definitions: this.settings.definitionsGroup });