Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(integration/commits): error on v-prefixed tag #223

Merged
merged 2 commits into from
Aug 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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",
],
);
});
2 changes: 1 addition & 1 deletion integration/deno.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@molt/integration",
"version": "0.19.3",
"version": "0.19.4",
"exports": {
".": "./mod.ts",
"./commits": "./commits.ts",
Expand Down