INNER CODE UNIT · JavaScript

genChangeLog

graphql-community/koa-graphql · resources/gen-changelog.js:86

function genChangeLog(tag, date, allPRs) {
  const byLabel = {};
  const committersByLogin = {};

  for (const pr of allPRs) {
    const labels = pr.labels.nodes
      .map((label) => label.name)
      .filter((label) => label.startsWith('PR: '));

    if (labels.length === 0) {
      throw new Error(`PR is missing label. See ${pr.url}`);
    }
    if (labels.length > 1) {
      throw new Error(
        `PR has conflicting labels: ${labels.join('\n')}\nSee ${pr.url}`,
      );
    }

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…