1
0
mirror of synced 2025-12-19 18:10:59 -05:00
Files
docs/script/graphql/utils/process-upcoming-changes.js
Vanessa Yuen 3df90fc9b8 Hello git history spelunker!
Are you looking for something? Here is all of the GitHub Docs history in one single commit. Enjoy! 🎉
2020-09-27 14:10:11 +02:00

16 lines
542 B
JavaScript

const yaml = require('js-yaml')
const { groupBy } = require('lodash')
const renderContent = require('../../../lib/render-content')
module.exports = async function processUpcomingChanges (upcomingChangesYml) {
const upcomingChanges = yaml.safeLoad(upcomingChangesYml).upcoming_changes
for (const change of upcomingChanges) {
change.date = change.date.slice(0, 10)
change.reason = await renderContent(change.reason)
change.description = await renderContent(change.description)
}
return groupBy(upcomingChanges, 'date')
}