Skip to content

Commit

Permalink
fix(integration/commits): error on v-prefixed tag
Browse files Browse the repository at this point in the history
  • Loading branch information
hasundue committed Aug 3, 2024
1 parent eadd754 commit 0f04fdc
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
2 changes: 1 addition & 1 deletion integration/commits.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export async function compareCommits(
if (!base || !head) {
return [];
}
const commits = await _compareCommits(repo, from, to);
const commits = await _compareCommits(repo, base, head);
await kv.set(
["commits", repo.owner, repo.name, from, to],
commits,
Expand Down
22 changes: 22 additions & 0 deletions integration/commits_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,25 @@ Deno.test("compareCommits - non existing tags", async () => {
[],
);
});

Deno.test("compareCommits - inconsistently prefixed tags", async () => {
assertEquals(
await compareCommits(
{
host: "github",
owner: "jsr-core",
name: "unknownutil",
},
"3.18.0",
"3.18.1",
),
[
":memo: Fix NPM README",
"Merge pull request #78 from jsr-core/fix-npm\n\n:memo: Fix NPM README",
":coffee: Refine deno tasks",
":memo: Add deprecation warning",
"Merge pull request #83 from jsr-core/deprecate\n" +
"\n" + ":memo: Add deprecation warning message",
],
);
});

0 comments on commit 0f04fdc

Please sign in to comment.