Skip to content

Latest commit

 

History

History
38 lines (28 loc) · 801 Bytes

README.md

File metadata and controls

38 lines (28 loc) · 801 Bytes

garden github-commit

The latest commit SHA provided by a CI environment or remote GitHub repository and branch.

Usage

import { githubCommit } from '@zendeskgarden/scripts';

const args: {
  path?: string;
  branch?: string;
  token?: string;
} = {
  /* optional overrides */
};

(async () => {
  const commit = await githubCommit(args);

  console.log(commit);
})();

Arguments

  • path optional path to a git directory; defaults to the current directory.
  • branch optional GitHub branch name; defaults to the value provided by githubBranch.
  • token optional GitHub personal access token; defaults to the value provided by githubToken.

Command

garden github-commit [--branch <branch>] [--token <token>] [path]