export type Commit = { hash: string; emoji: string; description: string; /** The commit author name (who wrote the change), not the committer who merged it. */ author: string; /** The author's GitHub login, when it could be resolved. Rendered as a clickable @mention. */ login?: string; }; export type ReleaseNotesSection = { title: string; commits: Commit[]; }; export type ReleaseNotes = { /** The tag (or ref) the notes start after, exclusive. Undefined when there is no previous tag. */ from?: string; /** The tag (or ref) the notes go up to, inclusive. */ to: string; /** Creation date of the `to` tag (YYYY-MM-DD), or undefined when it cannot be resolved. */ date?: string; sections: ReleaseNotesSection[]; /** All notable commits (emoji-prefixed or dependency updates), newest first. */ commits: Commit[]; }; /** * Returns the leading emoji of a commit subject together with the remaining text, * or null when the subject does not start with an emoji. */ export declare function parseEmojiCommit(subject: string): { emoji: string; description: string; } | null; /** Whether a non-emoji commit is clearly an automated dependency update. */ export declare function isDependencyCommit(options: { author?: string; email?: string; subject: string; }): boolean; /** Groups commits into sections, preserving the order defined in SECTIONS. */ export declare function groupCommits(commits: Commit[]): ReleaseNotesSection[]; /** Reads the list of version tags, sorted from newest to oldest. */ export declare function getVersionTags(cwd: string): Promise; /** The tag of the most recent release, or undefined when no version tags exist yet. */ export declare function getLatestVersionTag(cwd: string): Promise; /** The version tag released right before the given tag, based on semver ordering. */ export declare function getPreviousVersionTag(cwd: string, tag: string): Promise; /** * Collects the notable commits in `from..to` (or up to `to` when `from` is omitted). * A commit is notable when it starts with an emoji, or when it is an automated dependency * update from Renovate/Dependabot (which then gets grouped under Dependencies). */ export declare function collectReleaseCommits(cwd: string, options: { from?: string; to: string; }): Promise; /** * Resolves the date (YYYY-MM-DD) of a ref. For a tag this is its creation date * (the tagger date for annotated tags, the commit date for lightweight tags); * for any other ref (e.g. HEAD) it falls back to the commit date. */ export declare function getRefDate(cwd: string, ref: string): Promise; /** * Maps the full commit shas in `from..to` to their author's GitHub login using the * compare API (which resolves authors GitHub-side, since local commits only carry an * email/name). Returns an empty map when the API is unreachable or the commits are not * yet pushed, so callers degrade gracefully to plain author names. */ export declare function resolveAuthorLogins(cwd: string, repositorySlug: string, from: string, to: string): Promise>; /** Builds release notes for the commits between two refs. */ export declare function buildReleaseNotes(cwd: string, options: { from?: string; to: string; repositorySlug?: string; }): Promise; /** Reads the version that is being released. Lerna keeps this in lerna.json (fixed mode). */ export declare function getReleaseVersion(cwd: string): Promise; /** Parses "owner/repo" out of the origin remote URL (https or ssh form). */ export declare function getRepositorySlug(cwd: string): Promise; /** Renders release notes as GitHub-flavoured markdown. Returns a friendly placeholder when empty. */ export declare function renderReleaseNotes(notes: ReleaseNotes, options?: { repositorySlug?: string; }): string; //# sourceMappingURL=release-notes.d.ts.map