File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -368,6 +368,7 @@ async function loadCachedBaseReportFromPortal(
368
368
const {
369
369
config,
370
370
env : { settings } ,
371
+ base,
371
372
} = args ;
372
373
const { logger } = settings ;
373
374
@@ -381,6 +382,8 @@ async function loadCachedBaseReportFromPortal(
381
382
parameters : {
382
383
organization : config . upload . organization ,
383
384
project : config . upload . project ,
385
+ commit : base . sha ,
386
+ withDetails : true ,
384
387
} ,
385
388
} ) . catch ( ( error : unknown ) => {
386
389
logger . warn (
Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ import {
28
28
import * as utils from '@code-pushup/utils' ;
29
29
import type {
30
30
Comment ,
31
+ GitBranch ,
31
32
GitRefs ,
32
33
Logger ,
33
34
Options ,
@@ -309,7 +310,7 @@ describe('runInCI', () => {
309
310
} ) ;
310
311
311
312
describe ( 'pull request event' , ( ) => {
312
- let refs : GitRefs ;
313
+ let refs : { head : GitBranch ; base : GitBranch } ;
313
314
let diffMdString : string ;
314
315
315
316
beforeEach ( async ( ) => {
@@ -499,12 +500,16 @@ describe('runInCI', () => {
499
500
} ,
500
501
} satisfies RunResult ) ;
501
502
502
- expect ( downloadFromPortal ) . toHaveBeenCalledWith ( {
503
+ expect ( downloadFromPortal ) . toHaveBeenCalledWith <
504
+ Parameters < typeof downloadFromPortal >
505
+ > ( {
503
506
server : 'https://api.code-pushup.dunder-mifflin.org/graphql' ,
504
507
apiKey : 'cp_abcdef0123456789' ,
505
508
parameters : {
506
509
organization : 'dunder-mifflin' ,
507
510
project : 'website' ,
511
+ commit : refs . base . sha ,
512
+ withDetails : true ,
508
513
} ,
509
514
} ) ;
510
515
You can’t perform that action at this time.
0 commit comments