Skip to content

Instantly share code, notes, and snippets.

@protoEvangelion
Created October 19, 2017 15:32
Show Gist options
  • Select an option

  • Save protoEvangelion/293034fdbea1f998183f45f44f2615af to your computer and use it in GitHub Desktop.

Select an option

Save protoEvangelion/293034fdbea1f998183f45f44f2615af to your computer and use it in GitHub Desktop.
Gets git branch descriptions with js
const getBranchDescription = () => (
getOutput('git branch')
.split('\n')
.map(branch => (
branch.indexOf('*') === 0
? branch.slice(1).trim()
: branch.trim()
))
.map(branch => (
getOutput(`git config branch.${branch}.description`)
))
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment