Skip to content

Commit 9e22f70

Browse files
authored
Merge pull request #56 from apollographql/fix-relevant-commits-output
Use Object.fromEntries to make Map JSON.stringify-able
2 parents 845d77d + f1b5209 commit 9e22f70

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

dist/index.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/index.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,10 @@ async function processFile(
192192
core.setOutput('team', team);
193193
core.setOutput('is-migration', isMigration);
194194
core.setOutput('target-env', env);
195-
core.setOutput('relevant-commits', JSON.stringify(relevantCommits));
195+
core.setOutput(
196+
'relevant-commits',
197+
JSON.stringify(Object.fromEntries(relevantCommits)),
198+
);
196199
}
197200

198201
await writeFile(filename, contents);

src/update-promoted-values.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,9 @@ export async function updatePromotedValues(
8484
relevantCommits.set(serviceName, commits);
8585
}
8686

87-
logger.info(`Relevant commits: ${JSON.stringify(relevantCommits)}`);
87+
logger.info(
88+
`Relevant commits: ${JSON.stringify(Object.fromEntries(relevantCommits))}`,
89+
);
8890

8991
return [stringify(), relevantCommits];
9092
}

0 commit comments

Comments
 (0)