vscode-gitlens icon indicating copy to clipboard operation
vscode-gitlens copied to clipboard

Closes #2095 - Adds a getCurrentBranch Command

Open Maddimax opened this issue 2 years ago • 0 comments

Description

This adds the command "getCurrentBranch", which is basically a copy of "copyCurrentBranch", to allow tasks to use the current branch name. Example:

"tasks": [
  {
    "label": "echo",
    "type": "shell",
    "command": "echo ${command:gitlens.getCurrentBranch}",
  }
]

My specific motivation was to allow a build task to use the current branch name as a subfolder automatically.

Checklist

  • [x] I have followed the guidelines in the Contributing document
  • [x] My changes follow the coding style of this project
  • [x] My changes build without any errors or warnings
  • [x] My changes have been formatted and linted
  • [x] My changes include any required corresponding changes to the documentation (including CHANGELOG.md and README.md)
  • [x] My changes have been rebased and squashed to the minimal number (typically 1) of relevant commits
  • [x] My changes have a descriptive commit message with a short title, including a Fixes $XXX - or Closes #XXX - prefix to auto-close the issue that your PR addresses

Maddimax avatar Jul 18 '22 07:07 Maddimax