MCPcopy
hub / github.com/codeceptjs/CodeceptJS / processChangelog

Function processChangelog

runok.cjs:699–724  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

697}
698
699async function processChangelog() {
700 const file = 'CHANGELOG.md'
701 let changelog = fs.readFileSync(file).toString()
702
703 // user
704 changelog = changelog.replace(/\s@([\w-]+)/gm, ' **[$1](https://github.com/$1)**')
705
706 // issue
707 changelog = changelog.replace(/#(\d+)/gm, '[#$1](https://github.com/codeceptjs/CodeceptJS/issues/$1)')
708
709 // helper
710 changelog = changelog.replace(/\s\[(\w+)\]\s/gm, ' **[$1]** ')
711
712 writeToFile('docs/changelog.md', cfg => {
713 cfg.line('---')
714 cfg.line('permalink: /changelog')
715 cfg.line('title: Releases')
716 cfg.line('sidebar: false')
717 cfg.line('layout: Section')
718 cfg.line('---')
719 cfg.line('')
720 cfg.line('# Releases')
721 cfg.line('')
722 cfg.line(changelog)
723 })
724}
725
726if (require.main === module) runok(module.exports)

Callers 1

publishSiteFunction · 0.70

Calls 2

lineMethod · 0.80
toStringMethod · 0.45

Tested by

no test coverage detected