From a1402fd59820d0e91af3ed7fbb63e08dafdc9aa0 Mon Sep 17 00:00:00 2001 From: gentlementlegen Date: Mon, 2 Dec 2024 13:48:22 +0900 Subject: [PATCH] refactor: improve manifest decoding readability Separate JSON parsing from manifest decoding for clarity. --- src/github/utils/plugins.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/github/utils/plugins.ts b/src/github/utils/plugins.ts index 7fc8186..164e74c 100644 --- a/src/github/utils/plugins.ts +++ b/src/github/utils/plugins.ts @@ -31,7 +31,8 @@ async function fetchActionManifest(context: GitHubContext<"issue_comment.created }); if ("content" in data) { const content = Buffer.from(data.content, "base64").toString(); - const manifest = decodeManifest(JSON.parse(content)); + const contentParsed = JSON.parse(content); + const manifest = decodeManifest(contentParsed); _manifestCache[manifestKey] = manifest; return manifest; }