Get the current GitHub branch name provided by a CI environment or extracted from a git repository.
import { githubBranch } from '@zendeskgarden/scripts';
(async () => {
const branch = await githubBranch(path?: string);
console.log(branch);
})();
path
optional path to a git directory; defaults to the current directory.
garden github-branch [path]