MCPcopy Index your code
hub / github.com/changesets/changesets / getReleaseLine

Function getReleaseLine

packages/changelog-git/src/index.ts:8–25  ·  view source on GitHub ↗
(
  changeset: NewChangesetWithCommit,
  _type: VersionType
)

Source from the content-addressed store, hash-verified

6} from "@changesets/types";
7
8const getReleaseLine = async (
9 changeset: NewChangesetWithCommit,
10 _type: VersionType
11) => {
12 const [firstLine, ...futureLines] = changeset.summary
13 .split("\n")
14 .map((l) => l.trimEnd());
15
16 let returnVal = `- ${
17 changeset.commit ? `${changeset.commit.slice(0, 7)}: ` : ""
18 }${firstLine}`;
19
20 if (futureLines.length > 0) {
21 returnVal += `\n${futureLines.map((l) => ` ${l}`).join("\n")}`;
22 }
23
24 return returnVal;
25};
26
27const getDependencyReleaseLine = async (
28 changesets: NewChangesetWithCommit[],

Callers 1

index.test.tsFile · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected