1
0
mirror of synced 2025-12-21 02:46:50 -05:00
Files
docs/script/graphql/utils/process-upcoming-changes.js
Kevin Heis f6acb1f08a Update dependencies (#19408)
* Update dependencies 2

* Lint fixes

* Update graphql packages

* Update changelog-entry.json

* Update @octokit/rest

* Update commander with help from @rachmari

@rachmari

* Upgrade helmet

* Upgrade js-yaml

* Update server.js

* Update cheerio

* Revert "Update cheerio"

This reverts commit 8aa17c39fbf564ee554037d89e7a473027d16984.
2021-05-19 17:32:47 +00:00

16 lines
538 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.load(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')
}