Skip to content

Commit

Permalink
feat: commits inside a nested property
Browse files Browse the repository at this point in the history
This is in case we want to add more stuff to changelogs
  • Loading branch information
Pantotone committed Jan 2, 2024
1 parent 474171d commit 44e9257
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions methods/GenerateNightlyChangelog.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,17 @@ const currentTimestamp = releases[0]?.publishedAt;
const previousTimestamp = releases[1]?.publishedAt;

const commits = await GetCommits("YARC-Official", "YARG", "dev", previousTimestamp, currentTimestamp);

const formatted = commits.map(commit => {
const formattedCommits = commits.map(commit => {
return {
sha: commit.oid,
author: commit.author.user.login,
summary: commit.messageHeadline
}
});

const output = {
commits: formattedCommits
};

const savePath = path.join(NIGHTLYYARG_CHANGELOG_FOLDER, currentTag);
await fs.writeFile(savePath, JSON.stringify(formatted, null, 2));
await fs.writeFile(savePath, JSON.stringify(output, null, 2));

0 comments on commit 44e9257

Please sign in to comment.