Skip to content

Commit

Permalink
refactor: improve manifest decoding readability
Browse files Browse the repository at this point in the history
Separate JSON parsing from manifest decoding for clarity.
  • Loading branch information
gentlementlegen committed Dec 2, 2024
1 parent 72d1a60 commit a1402fd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/github/utils/plugins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit a1402fd

Please sign in to comment.