Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions packages/ci/src/lib/run-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,7 @@ async function loadCachedBaseReportFromPortal(
const {
config,
env: { settings },
base,
} = args;
const { logger } = settings;

Expand All @@ -381,6 +382,8 @@ async function loadCachedBaseReportFromPortal(
parameters: {
organization: config.upload.organization,
project: config.upload.project,
commit: base.sha,
withDetails: true,
},
}).catch((error: unknown) => {
logger.warn(
Expand Down
9 changes: 7 additions & 2 deletions packages/ci/src/lib/run.int.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import {
import * as utils from '@code-pushup/utils';
import type {
Comment,
GitBranch,
GitRefs,
Logger,
Options,
Expand Down Expand Up @@ -309,7 +310,7 @@ describe('runInCI', () => {
});

describe('pull request event', () => {
let refs: GitRefs;
let refs: { head: GitBranch; base: GitBranch };
let diffMdString: string;

beforeEach(async () => {
Expand Down Expand Up @@ -499,12 +500,16 @@ describe('runInCI', () => {
},
} satisfies RunResult);

expect(downloadFromPortal).toHaveBeenCalledWith({
expect(downloadFromPortal).toHaveBeenCalledWith<
Parameters<typeof downloadFromPortal>
>({
server: 'https://api.code-pushup.dunder-mifflin.org/graphql',
apiKey: 'cp_abcdef0123456789',
parameters: {
organization: 'dunder-mifflin',
project: 'website',
commit: refs.base.sha,
withDetails: true,
},
});

Expand Down
Loading