Skip to content

Commit

Permalink
fix(projects): fix get to value
Browse files Browse the repository at this point in the history
  • Loading branch information
honghuangdc committed Apr 23, 2024
1 parent d510e9c commit b9bbd9e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Presets, SingleBar } from 'cli-progress';
import { createOptions } from './options';
import { getFromToTags, getGitCommits, getGitCommitsAndResolvedAuthors } from './git';
import { getCurrentGitBranch, getFromToTags, getGitCommits, getGitCommitsAndResolvedAuthors } from './git';
import { generateMarkdown, isVersionInMarkdown, writeMarkdown } from './markdown';
import type { ChangelogOption } from './types';

Expand All @@ -13,7 +13,10 @@ import type { ChangelogOption } from './types';
export async function getChangelogMarkdown(options?: Partial<ChangelogOption>, showTitle = true) {
const opts = await createOptions(options);

const gitCommits = await getGitCommits(opts.from, opts.to);
const current = await getCurrentGitBranch();
const to = opts.tags.includes(opts.to) ? opts.to : current;

const gitCommits = await getGitCommits(opts.from, to);
const resolvedLogins = new Map<string, string>();
const { commits, contributors } = await getGitCommitsAndResolvedAuthors(gitCommits, opts.github, resolvedLogins);

Expand Down

0 comments on commit b9bbd9e

Please sign in to comment.