ChemPal Documentation - v1.6.0
    Preparing search index...

    Function getReleaseNotes

    • Looks up the release notes for a specific version.

      Parameters

      • version: string

        The version to look up, with or without a leading v.

      Returns Promise<undefined | { releaseUrl: string; notes: ReleaseSection[] }>

      The parsed notes and release page URL; notes is empty when the release has no usable body, and the result is undefined on failure.

      await getReleaseNotes("1.3.0");
      // { releaseUrl: "https://github.com/…", notes: [{ title: "Added", items: ["…"] }] }
      export async function getReleaseNotes(
      version: string,
      ): Promise<{ releaseUrl: string; notes: ReleaseSection[] } | undefined> {
      const release = await getReleaseByTag(version);
      if (!release) return undefined;
      return { releaseUrl: release.html_url, notes: parseReleaseNotes(release.body ?? undefined) };
      }