@@ -100,13 +100,7 @@ function gitExec(args) {
100100async function getCommitForFile ( filePath ) {
101101 try {
102102 // Find the commit that added this file
103- const sha = await gitExec ( [
104- "log" ,
105- "--diff-filter=A" ,
106- "--format=%H" ,
107- "--" ,
108- filePath ,
109- ] ) ;
103+ const sha = await gitExec ( [ "log" , "--diff-filter=A" , "--format=%H" , "--" , filePath ] ) ;
110104 return sha . split ( "\n" ) [ 0 ] || null ;
111105 } catch {
112106 return null ;
@@ -118,15 +112,12 @@ async function getPrForCommit(commitSha) {
118112 if ( ! token || ! commitSha ) return null ;
119113
120114 try {
121- const res = await fetch (
122- `https://api.github.com/repos/${ REPO } /commits/${ commitSha } /pulls` ,
123- {
124- headers : {
125- Authorization : `token ${ token } ` ,
126- Accept : "application/vnd.github.v3+json" ,
127- } ,
128- }
129- ) ;
115+ const res = await fetch ( `https://api.github.com/repos/${ REPO } /commits/${ commitSha } /pulls` , {
116+ headers : {
117+ Authorization : `token ${ token } ` ,
118+ Accept : "application/vnd.github.v3+json" ,
119+ } ,
120+ } ) ;
130121 if ( ! res . ok ) return null ;
131122
132123 const pulls = await res . json ( ) ;
@@ -173,9 +164,7 @@ async function parseServerChanges() {
173164 }
174165
175166 // Look up commits for all files in parallel
176- const commits = await Promise . all (
177- fileData . map ( ( f ) => getCommitForFile ( f . filePath ) )
178- ) ;
167+ const commits = await Promise . all ( fileData . map ( ( f ) => getCommitForFile ( f . filePath ) ) ) ;
179168
180169 // Look up PRs for all commits in parallel
181170 const prNumbers = await Promise . all ( commits . map ( ( sha ) => getPrForCommit ( sha ) ) ) ;
@@ -222,35 +211,24 @@ function formatPrBody({ version, packageEntries, serverEntries, rawBody }) {
222211
223212 const features = packageEntries . filter ( ( e ) => e . type === "feature" ) ;
224213 const fixes = packageEntries . filter ( ( e ) => e . type === "fix" ) ;
225- const improvements = packageEntries . filter (
226- ( e ) => e . type === "improvement" || e . type === "other"
227- ) ;
214+ const improvements = packageEntries . filter ( ( e ) => e . type === "improvement" || e . type === "other" ) ;
228215 const breaking = packageEntries . filter ( ( e ) => e . type === "breaking" ) ;
229216
230217 const serverFeatures = serverEntries . filter ( ( e ) => e . type === "feature" ) ;
231218 const serverFixes = serverEntries . filter ( ( e ) => e . type === "fix" ) ;
232- const serverImprovements = serverEntries . filter (
233- ( e ) => e . type === "improvement"
234- ) ;
219+ const serverImprovements = serverEntries . filter ( ( e ) => e . type === "improvement" ) ;
235220 const serverBreaking = serverEntries . filter ( ( e ) => e . type === "breaking" ) ;
236221
237222 const totalFeatures = features . length + serverFeatures . length ;
238223 const totalFixes = fixes . length + serverFixes . length ;
239224 const totalImprovements = improvements . length + serverImprovements . length ;
240225
241- lines . push ( `# trigger.dev v${ version } ` ) ;
242- lines . push ( "" ) ;
243-
244226 // Summary line
245227 const parts = [ ] ;
246- if ( totalFeatures > 0 )
247- parts . push ( `${ totalFeatures } new feature${ totalFeatures > 1 ? "s" : "" } ` ) ;
228+ if ( totalFeatures > 0 ) parts . push ( `${ totalFeatures } new feature${ totalFeatures > 1 ? "s" : "" } ` ) ;
248229 if ( totalImprovements > 0 )
249- parts . push (
250- `${ totalImprovements } improvement${ totalImprovements > 1 ? "s" : "" } `
251- ) ;
252- if ( totalFixes > 0 )
253- parts . push ( `${ totalFixes } bug fix${ totalFixes > 1 ? "es" : "" } ` ) ;
230+ parts . push ( `${ totalImprovements } improvement${ totalImprovements > 1 ? "s" : "" } ` ) ;
231+ if ( totalFixes > 0 ) parts . push ( `${ totalFixes } bug fix${ totalFixes > 1 ? "es" : "" } ` ) ;
254232 if ( parts . length > 0 ) {
255233 lines . push ( `## Summary` ) ;
256234 lines . push ( `${ parts . join ( ", " ) } .` ) ;
@@ -260,8 +238,7 @@ function formatPrBody({ version, packageEntries, serverEntries, rawBody }) {
260238 // Breaking changes
261239 if ( breaking . length > 0 || serverBreaking . length > 0 ) {
262240 lines . push ( "## Breaking changes" ) ;
263- for ( const entry of [ ...breaking , ...serverBreaking ] )
264- lines . push ( `- ${ entry . text } ` ) ;
241+ for ( const entry of [ ...breaking , ...serverBreaking ] ) lines . push ( `- ${ entry . text } ` ) ;
265242 lines . push ( "" ) ;
266243 }
267244
@@ -290,17 +267,11 @@ function formatPrBody({ version, packageEntries, serverEntries, rawBody }) {
290267 }
291268
292269 // Server changes
293- const allServer = [
294- ...serverFeatures ,
295- ...serverImprovements ,
296- ...serverFixes ,
297- ] ;
270+ const allServer = [ ...serverFeatures , ...serverImprovements , ...serverFixes ] ;
298271 if ( allServer . length > 0 ) {
299272 lines . push ( "## Server changes" ) ;
300273 lines . push ( "" ) ;
301- lines . push (
302- "These changes affect the self-hosted Docker image and Trigger.dev Cloud:"
303- ) ;
274+ lines . push ( "These changes affect the self-hosted Docker image and Trigger.dev Cloud:" ) ;
304275 lines . push ( "" ) ;
305276 for ( const entry of allServer ) {
306277 // Indent continuation lines so multi-line entries stay inside the list item
0 commit comments