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(
368368 const {
369369 config,
370370 env : { settings } ,
371+ base,
371372 } = args ;
372373 const { logger } = settings ;
373374
@@ -381,6 +382,8 @@ async function loadCachedBaseReportFromPortal(
381382 parameters : {
382383 organization : config . upload . organization ,
383384 project : config . upload . project ,
385+ commit : base . sha ,
386+ withDetails : true ,
384387 } ,
385388 } ) . catch ( ( error : unknown ) => {
386389 logger . warn (
Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ import {
2828import * as utils from '@code-pushup/utils' ;
2929import type {
3030 Comment ,
31+ GitBranch ,
3132 GitRefs ,
3233 Logger ,
3334 Options ,
@@ -309,7 +310,7 @@ describe('runInCI', () => {
309310 } ) ;
310311
311312 describe ( 'pull request event' , ( ) => {
312- let refs : GitRefs ;
313+ let refs : { head : GitBranch ; base : GitBranch } ;
313314 let diffMdString : string ;
314315
315316 beforeEach ( async ( ) => {
@@ -499,12 +500,16 @@ describe('runInCI', () => {
499500 } ,
500501 } satisfies RunResult ) ;
501502
502- expect ( downloadFromPortal ) . toHaveBeenCalledWith ( {
503+ expect ( downloadFromPortal ) . toHaveBeenCalledWith <
504+ Parameters < typeof downloadFromPortal >
505+ > ( {
503506 server : 'https://api.code-pushup.dunder-mifflin.org/graphql' ,
504507 apiKey : 'cp_abcdef0123456789' ,
505508 parameters : {
506509 organization : 'dunder-mifflin' ,
507510 project : 'website' ,
511+ commit : refs . base . sha ,
512+ withDetails : true ,
508513 } ,
509514 } ) ;
510515
You can’t perform that action at this time.
0 commit comments