Skip to content

Commit

Permalink
chore: formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
erikburt committed Mar 10, 2025
1 parent 5e50374 commit b785442
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 5 deletions.
22 changes: 18 additions & 4 deletions actions/signed-commits/src/git/github-git/repo-tags.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,11 @@ describe("repo-tags", () => {
expect(createdTags.length).toBe(testTags.localOnlyTags.length);
expect(createdTags.every((t) => t.name.includes("/"))).toBe(true);
for (const cTag of createdTags) {
expect(testTags.localOnlyTags.some((lTag) => lTag.name === cTag.originalName)).toBe(true);
expect(
testTags.localOnlyTags.some(
(lTag) => lTag.name === cTag.originalName,
),
).toBe(true);
}

const afterTagTypes = await listTagTypes(
Expand All @@ -150,17 +154,27 @@ describe("repo-tags", () => {
expect(createdTags.length).toBe(testTags.localOnlyTags.length);
expect(createdTags.every((t) => t.name.includes("/"))).toBe(true);
for (const cTag of createdTags) {
expect(testTags.localOnlyTags.some((lTag) => lTag.name === cTag.originalName)).toBe(true);
expect(
testTags.localOnlyTags.some(
(lTag) => lTag.name === cTag.originalName,
),
).toBe(true);
}

// 2nd pass - create new local only tags, and check diff with tag rewrites
// should have 6 remote tags, and 3 local only tags
const newLocalOnlyTestTags = await createAnnotatedTestTags(testTags.localRepoPath, "new-local-only", 3);
const newLocalOnlyTestTags = await createAnnotatedTestTags(
testTags.localRepoPath,
"new-local-only",
3,
);
const createdTags2 = await pushTags("/", testTags.localRepoPath);

expect(createdTags2.length).toBe(newLocalOnlyTestTags.length);
for (const cTag of createdTags2) {
expect(newLocalOnlyTestTags.some((lTag) => lTag.name === cTag.originalName)).toBe(true);
expect(
newLocalOnlyTestTags.some((lTag) => lTag.name === cTag.originalName),
).toBe(true);
}
});
});
Expand Down
2 changes: 1 addition & 1 deletion actions/signed-commits/src/git/github-git/repo-tags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export async function createLightweightTags(
return {
name: newTagName,
ref: tag.ref,
originalName: (newTagName != tag.name) ? tag.name : undefined,
originalName: newTagName != tag.name ? tag.name : undefined,
};
});

Expand Down

0 comments on commit b785442

Please sign in to comment.