Skip to content

Commit 57bfc00

Browse files
committed
Merge branch 'main' into use-cp-nx-plugin
# Conflicts: # project.json
2 parents 5ec4034 + a6d3965 commit 57bfc00

File tree

32 files changed

+550
-258
lines changed

32 files changed

+550
-258
lines changed

.github/workflows/code-pushup-fork.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Code PushUp (fork)
1+
name: Code PushUp - Standalone Mode (fork)
22

33
# separated from code-pushup.yml for security reasons
44
# => requires permissions to create PR comment
@@ -20,19 +20,23 @@ permissions:
2020
jobs:
2121
code-pushup:
2222
runs-on: ubuntu-latest
23-
name: Code PushUp
23+
name: Run Code PushUp (fork)
2424
if: github.event.pull_request.head.repo.fork
2525
steps:
2626
- name: Checkout repository
2727
uses: actions/checkout@v4
28+
with:
29+
fetch-depth: 0
2830
- name: Set up Node.js
2931
uses: actions/setup-node@v4
3032
with:
3133
node-version-file: .nvmrc
3234
cache: npm
35+
- name: Set base and head for Nx affected commands
36+
uses: nrwl/nx-set-shas@v4
3337
- name: Install dependencies
3438
run: npm ci
3539
- name: Run Code PushUp action
3640
uses: code-pushup/github-action@v0
3741
with:
38-
bin: npx nx code-pushup --
42+
bin: npx nx code-pushup --nx-bail --

.github/workflows/code-pushup.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Code PushUp
1+
name: Code PushUp - Standalone Mode
22

33
on:
44
push:
@@ -16,7 +16,7 @@ permissions:
1616
jobs:
1717
code-pushup:
1818
runs-on: ubuntu-latest
19-
name: Code PushUp
19+
name: Run Code PushUp
2020
# ignore PRs from forks, handled by code-pushup-fork.yml
2121
if: ${{ !github.event.pull_request.head.repo.fork }}
2222
env:
@@ -27,14 +27,18 @@ jobs:
2727
steps:
2828
- name: Checkout repository
2929
uses: actions/checkout@v4
30+
with:
31+
fetch-depth: 0
3032
- name: Set up Node.js
3133
uses: actions/setup-node@v4
3234
with:
3335
node-version-file: .nvmrc
3436
cache: npm
37+
- name: Set base and head for Nx affected commands
38+
uses: nrwl/nx-set-shas@v4
3539
- name: Install dependencies
3640
run: npm ci
3741
- name: Run Code PushUp action
3842
uses: code-pushup/github-action@v0
3943
with:
40-
bin: npx nx code-pushup --
44+
bin: npx nx code-pushup --nx-bail --

CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
## 0.77.0 (2025-08-28)
2+
3+
### 🚀 Features
4+
5+
- **core:** pass config to plugin runner ([#1087](https://github.com/code-pushup/cli/pull/1087))
6+
- **plugin-eslint:** add artifact loading logic ([#1077](https://github.com/code-pushup/cli/pull/1077))
7+
8+
### 🩹 Fixes
9+
10+
- **ci:** prevent parallel git diff when detecting new issues in monorepo ([f5f9114d](https://github.com/code-pushup/cli/commit/f5f9114d))
11+
12+
### ❤️ Thank You
13+
14+
- Matěj Chalk
15+
- Michael Hladky @BioPhoton
16+
117
## 0.76.0 (2025-08-25)
218

319
### 🚀 Features

code-pushup.config.ts

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import 'dotenv/config';
2-
import { z } from 'zod';
32
import {
43
coverageCoreConfigNx,
54
eslintCoreConfigNx,
@@ -11,25 +10,17 @@ import {
1110
import type { CoreConfig } from './packages/models/src/index.js';
1211
import { mergeConfigs } from './packages/utils/src/index.js';
1312

14-
// load upload configuration from environment
15-
const envSchema = z.object({
16-
CP_SERVER: z.string().url(),
17-
CP_API_KEY: z.string().min(1),
18-
CP_ORGANIZATION: z.string().min(1),
19-
CP_PROJECT: z.string().min(1),
20-
});
21-
const { data: env } = await envSchema.safeParseAsync(process.env);
13+
const project = process.env['NX_TASK_TARGET_PROJECT'] || 'cli-workspace';
2214

2315
const config: CoreConfig = {
24-
...(env && {
16+
...(process.env['CP_API_KEY'] && {
2517
upload: {
26-
server: env.CP_SERVER,
27-
apiKey: env.CP_API_KEY,
28-
organization: env.CP_ORGANIZATION,
29-
project: 'cli-workspace',
18+
project,
19+
organization: 'code-pushup',
20+
server: 'https://api.staging.code-pushup.dev/graphql',
21+
apiKey: process.env['CP_API_KEY'],
3022
},
3123
}),
32-
3324
plugins: [],
3425
};
3526

code-pushup.preset.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import coveragePlugin, {
77
getNxCoveragePaths,
88
} from './packages/plugin-coverage/src/index.js';
99
import eslintPlugin, {
10-
eslintConfigFromNxProject,
10+
eslintConfigFromAllNxProjects,
1111
} from './packages/plugin-eslint/src/index.js';
1212
import type { ESLintTarget } from './packages/plugin-eslint/src/lib/config.js';
1313
import { nxProjectsToConfig } from './packages/plugin-eslint/src/lib/nx/projects-to-config.js';
@@ -172,11 +172,12 @@ export const eslintCoreConfigNx = async (
172172
projectName?: string,
173173
): Promise<CoreConfig> => ({
174174
plugins: [
175-
await eslintPlugin(
176-
await (projectName
177-
? eslintConfigFromNxProject(projectName)
178-
: eslintConfigFromPublishableNxProjects()),
179-
),
175+
projectName
176+
? await eslintPlugin({
177+
eslintrc: `packages/${projectName}/eslint.config.js`,
178+
patterns: ['.'],
179+
})
180+
: await eslintPlugin(await eslintConfigFromAllNxProjects()),
180181
],
181182
categories: eslintCategories,
182183
});

examples/plugins/code-pushup.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import {
1616
* `nx run-collect examples-plugins`
1717
*
1818
* - For all formats use `--persist.format=md,json`
19-
* - For better debugging use `--verbose --no-progress`
19+
* - For better debugging, use `--verbose --no-progress`
2020
*
2121
*/
2222

0 commit comments

Comments
 (0)