Code PushUp portal client
Type definitions and client for uploading report to portal.
Setup
npm install @code-pushup/portal-client
Usage
Upload report to portal
import { uploadToPortal } from '@code-pushup/portal-client';
// ...
const report = await uploadToPortal({
server: '<GRAPHQL URL>',
apiKey: process.env.CODE_PUSHUP_API_KEY,
data: {
organization: '<ORGANIZATION SLUG>',
project: '<PROJECT SLUG>',
commit: '<COMMIT SHA>',
plugins: [
// ...
],
categories: [
// ...
],
// ...
},
});