Skip to content
Merged
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
16 changes: 13 additions & 3 deletions actions/setup/js/frontmatter_hash_github_api.test.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -403,9 +403,19 @@ describe("frontmatter_hash with GitHub API", () => {
console.log(`\n🔍 Fetching live data from GitHub API: ${owner}/${repo}/${workflowPath}@${ref}`);

// Compute hash using live API data
const hash = await computeFrontmatterHash(workflowPath, {
fileReader,
});
let hash;
try {
hash = await computeFrontmatterHash(workflowPath, {
fileReader,
});
Comment on lines +406 to +410
} catch (err) {
if (err.message?.toLowerCase().includes("rate limit")) {
console.log("Skipping live API test - GitHub API rate limit exceeded");
console.log("This is expected when the API rate limit is reached during CI runs");
Comment on lines +411 to +414
return;
}
throw err;
}

// Verify hash format
expect(hash).toMatch(/^[a-f0-9]{64}$/);
Expand Down