Skip to content

Commit

Permalink
save
Browse files Browse the repository at this point in the history
  • Loading branch information
sarahgm committed Sep 20, 2024
1 parent 9490230 commit e447d08
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions docs/contentlayer.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export const ChangelogPage = defineDocumentType(() => ({
},
},
// get the date of the release of the package
releaseDate: {
releases: {
type: 'string',
resolve: async doc => {
const file = path.resolve(contentDirPath, doc._raw.sourceFilePath);
Expand All @@ -115,11 +115,12 @@ export const ChangelogPage = defineDocumentType(() => ({
*/
// author_name: 'github-actions[bot]',
const log = await git.log({ file: file, strictDate: true });
console.log('LOG', log);
return log.latest?.date;
// return log.all.map(item => {
// return item.date;
// });
const releases = log.all.filter(
release => release.author_name === 'github-actions[bot]'
);

console.log(releases.filter(rel => rel.refs));
return { releases };
},
},
},
Expand Down

0 comments on commit e447d08

Please sign in to comment.