@@ -3,7 +3,7 @@ import { $fetch } from 'ofetch'
3
3
import { inc } from 'semver'
4
4
import { generateMarkDown , getCurrentGitBranch , loadChangelogConfig } from 'changelogen'
5
5
import { consola } from 'consola'
6
- import { determineBumpType , getLatestCommits , loadWorkspace } from './_utils'
6
+ import { determineBumpType , getContributors , getLatestCommits , loadWorkspace } from './_utils'
7
7
8
8
async function main ( ) {
9
9
const releaseBranch = await getCurrentGitBranch ( )
@@ -36,11 +36,17 @@ async function main () {
36
36
37
37
// Get the current PR for this release, if it exists
38
38
const [ currentPR ] = await $fetch ( `https://api.github.com/repos/nuxt/nuxt/pulls?head=nuxt:v${ newVersion } ` )
39
+ const contributors = await getContributors ( )
39
40
40
41
const releaseNotes = [
41
42
currentPR ?. body . replace ( / # # 👉 C h a n g e l o g [ \s \S ] * $ / , '' ) || `> ${ newVersion } is the next ${ bumpType } release.\n>\n> **Timetable**: to be announced.` ,
42
43
'## 👉 Changelog' ,
43
- changelog . replace ( / ^ # # v .* ?\n / , '' ) . replace ( `...${ releaseBranch } ` , `...v${ newVersion } ` )
44
+ changelog
45
+ . replace ( / ^ # # v .* ?\n / , '' )
46
+ . replace ( `...${ releaseBranch } ` , `...v${ newVersion } ` )
47
+ . replace ( / # # # ❤ ️ C o n t r i b u t o r s [ \s \S ] * $ / , '' ) ,
48
+ `### ❤️ Contributors` ,
49
+ contributors . map ( c => `- ${ c . name } (@${ c . username } )` ) . join ( '\n' )
44
50
] . join ( '\n' )
45
51
46
52
// Create a PR with release notes if none exists
0 commit comments