diff --git a/dist/index.js b/dist/index.js index 7ecc71d..a0c141d 100644 --- a/dist/index.js +++ b/dist/index.js @@ -74672,8 +74672,8 @@ async function getRepositoryMetadata(repository, token) { const response = await fetch(`${process.env.GITHUB_API_URL}/repos/${repository}`, { method: 'GET', headers: { - 'Authorization': `Bearer ${token}`, - 'Accept': 'application/vnd.github.v3+json' + Authorization: `Bearer ${token}`, + Accept: 'application/vnd.github.v3+json' } }); if (!response.ok) { @@ -74684,7 +74684,7 @@ async function getRepositoryMetadata(repository, token) { if (!data.id || !data.owner.id) { throw new Error(`Failed to fetch repository metadata: unexpected response format`); } - return { repoId: data.id, ownerId: data.owner.id }; + return { repoId: String(data.id), ownerId: String(data.owner.id) }; } exports.getRepositoryMetadata = getRepositoryMetadata; async function getContainerRegistryURL() { diff --git a/src/api-client.ts b/src/api-client.ts index e0ab644..bb5cd9c 100644 --- a/src/api-client.ts +++ b/src/api-client.ts @@ -6,13 +6,15 @@ export async function getRepositoryMetadata( token: string ): Promise<{ repoId: string; ownerId: string }> { const response = await fetch( - `${process.env.GITHUB_API_URL}/repos/${repository}`, { + `${process.env.GITHUB_API_URL}/repos/${repository}`, + { method: 'GET', headers: { - 'Authorization': `Bearer ${token}`, - 'Accept': 'application/vnd.github.v3+json' + Authorization: `Bearer ${token}`, + Accept: 'application/vnd.github.v3+json' } - }) + } + ) if (!response.ok) { throw new Error(