How to use @lerna/github-client - 2 common examples

To help you get started, we’ve selected a few @lerna/github-client examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github lerna / lerna / commands / version / lib / create-release.js View on Github external
function createClient(type) {
  switch (type) {
    case "gitlab":
      return createGitLabClient();
    case "github":
      return createGitHubClient();
    /* istanbul ignore next: guarded by yargs.choices() */
    default:
      throw new ValidationError("ERELEASE", "Invalid release client type");
  }
}
github lerna / lerna / commands / version / lib / create-release.js View on Github external
function createRelease(type, { tags, releaseNotes }, { gitRemote, execOpts }) {
  const repo = parseGitRepo(gitRemote, execOpts);
  const client = createClient(type);

  return Promise.all(
    releaseNotes.map(({ notes, name }) => {
      const tag = name === "fixed" ? tags[0] : tags.find(t => t.startsWith(`${name}@`));

      /* istanbul ignore if */
      if (!tag) {
        return Promise.resolve();
      }

      const prereleaseParts = semver.prerelease(tag.replace(`${name}@`, "")) || [];

      return client.repos.createRelease({
        owner: repo.owner,
        repo: repo.name,

@lerna/github-client

An internal Lerna tool

MIT
Latest version published 1 year ago

Package Health Score

70 / 100
Full package analysis