The latest commit SHA provided by a CI environment or remote GitHub repository and branch.
import { githubCommit } from '@zendeskgarden/scripts';
const args: {
path?: string;
branch?: string;
token?: string;
} = {
/* optional overrides */
};
(async () => {
const commit = await githubCommit(args);
console.log(commit);
})();
path
optional path to a git directory; defaults to the current directory.branch
optional GitHub branch name; defaults to the value provided bygithubBranch
.token
optional GitHub personal access token; defaults to the value provided bygithubToken
.
garden github-commit [--branch <branch>] [--token <token>] [path]