Skip to content

More flexible input variables: Multiple values & labels #68397

@mdschweda

Description

@mdschweda

I love the new input variables feature and was eager to thin out the tasks lists of my projects. Unfortunately, I realized that the mechanism does not suffice for most cases. Items of the options array may be cryptic ids and often a choice represents a combination of variables. May I suggest that you support multiple values and, consequently, labels?

Example:

{
  "tasks": [{
    "label": "🐳 Docker build",
    "type": "shell",
    "command": "docker",
    "args": ["build", "-t", "${input:image.tag}", "."],
    "options": {
      "cwd": "${workspaceFolder}/${input:image.context}"
    },
    "problemMatcher": []
  }],
  "inputs": [{
    "id": "image",
    "type": "pickString",
    "description": "Which image to build?",
    "options": [{
      "label": "💵 Billing",
      "value": {
        "tag": "my.azurecr.io/myshop-billing",
        "context": "backend/services/billing"
      }
    }]
  }]
}

Valid values might be:

{
  "options": [
    "a string",
    { "value": "with a", "label": ":)" },
    { "label": "with multiple", "value": { "s": "" } }
  ]
}

Metadata

Metadata

Assignees

Labels

feature-requestRequest for new features or functionalitytasksTask system issues

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions