@@ -84,9 +84,10 @@ const header = `
84
84
| Name | +/- | Base | Current | +/- gzip | Base gzip | Current gzip |
85
85
| ---- | --- | ---- | ------- | -------- | --------- | ------------ |` ;
86
86
87
- function row ( result ) {
87
+ function row ( result , baseSha , headSha ) {
88
+ const diffViewUrl = `https://react-builds.vercel.app/commits/${ headSha } /files/${ result . path } ?compare=${ baseSha } ` ;
88
89
// prettier-ignore
89
- return `| ${ result . path } | **${ change ( result . change ) } ** | ${ kbs ( result . baseSize ) } | ${ kbs ( result . headSize ) } | ${ change ( result . changeGzip ) } | ${ kbs ( result . baseSizeGzip ) } | ${ kbs ( result . headSizeGzip ) } ` ;
90
+ return `| [ ${ result . path } ]( ${ diffViewUrl } ) | **${ change ( result . change ) } ** | ${ kbs ( result . baseSize ) } | ${ kbs ( result . headSize ) } | ${ change ( result . changeGzip ) } | ${ kbs ( result . baseSizeGzip ) } | ${ kbs ( result . headSizeGzip ) } ` ;
90
91
}
91
92
92
93
( async function ( ) {
@@ -196,7 +197,7 @@ function row(result) {
196
197
artifactPath
197
198
) ;
198
199
}
199
- criticalResults . push ( row ( result ) ) ;
200
+ criticalResults . push ( row ( result , baseSha , headSha ) ) ;
200
201
}
201
202
202
203
let significantResults = [ ] ;
@@ -212,7 +213,7 @@ function row(result) {
212
213
// Skip critical artifacts. We added those earlier, in a fixed order.
213
214
! CRITICAL_ARTIFACT_PATHS . has ( result . path )
214
215
) {
215
- criticalResults . push ( row ( result ) ) ;
216
+ criticalResults . push ( row ( result , baseSha , headSha ) ) ;
216
217
}
217
218
218
219
// Do the same for results that exceed the significant threshold. These
@@ -224,7 +225,7 @@ function row(result) {
224
225
result . change === Infinity ||
225
226
result . change === - 1
226
227
) {
227
- significantResults . push ( row ( result ) ) ;
228
+ significantResults . push ( row ( result , baseSha , headSha ) ) ;
228
229
}
229
230
}
230
231
0 commit comments