Skip to content

Commit 8cda2c1

Browse files
yifancongCopilot
andauthored
Update src/download.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 55aa48d commit 8cda2c1

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/download.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,14 @@ export async function downloadArtifactByCommitHash(commitHash: string, fileName:
107107

108108
try {
109109
const artifacts = await githubService.listArtifacts();
110-
const artifactDetails = artifacts.artifacts.find((a: { id: any; }) => a.id === artifact.id);
110+
interface Artifact {
111+
id: number;
112+
name: string;
113+
created_at: string;
114+
expired_at?: string;
115+
size_in_bytes: number;
116+
}
117+
const artifactDetails = artifacts.artifacts.find((a: Artifact) => a.id === artifact.id);
111118
if (artifactDetails) {
112119
console.log(`📊 Artifact details:`);
113120
console.log(` - Created: ${artifactDetails.created_at}`);

0 commit comments

Comments
 (0)