cli icon indicating copy to clipboard operation
cli copied to clipboard

Bug report - code-pushup/github-action fails with "Missing required arguments: before, after"

Open MoritzMeinhardt opened this issue 3 months ago • 1 comments

Hi team,

Thanks for your great work. I really like using code pushup as a reporting tool in our PR workflow.

Since upgrading, the GitHub Action code-pushup/github-action stopped working in our CI. It now fails with:

Missing required arguments: before, after

when calling

nx run X:code-pushup compare --verbose

Pinning the action back to v0.9.6 fixes the issue, so this appears to be a regression introduced in a later release.

Environment: Node: 20.19.4 OS: linux-x64 pnpm: 8.15.9 nx: 20.8.1 @code-pushup/core: 0.69.2

Part of the log:

Switched back to PR/MR branch $ npx nx run-many --targets=code-pushup --parallel=false --projects=[...] -- compare --verbose

NX Running target code-pushup for project [...]:

  • [...]

With additional flags: compare --verbose=true

❌ > nx run [...]:code-pushup compare --verbose

code-pushup compare

Missing required arguments: before, after

Before it looked like this:

Switched back to PR/MR branch $ npx nx run [...]:code-pushup -- compare --verbose --before=/home/runner/work/[...]/[...]/.code-pushup/.ci/[...]/.previous/report.json --after=/home/runner/work/[...]/[...]/.code-pushup/.ci/[...]/.current/report.json --label=[...] --persist.format=json --persist.format=md

What would you expect to happen?

The before and and after parameters should be set by the code-pushup github action.

What steps did you take?

I used this github action config:

  - name: Code PushUp
    uses: code-pushup/github-action@v0
    with:
      monorepo: true

Code PushUp package version

0.69.2

What operation system are you on?

Linux

Node version

20.19.4

Relevant log output


MoritzMeinhardt avatar Sep 01 '25 11:09 MoritzMeinhardt

Hi, this was indeed an intentional change. The latest version of the code-pushup/github-action is compatible with @code-pushup/* package versions 0.72.0 onwards. So updating your @code-pushup/* npm dependencies should resolve the error.

matejchalk avatar Sep 26 '25 08:09 matejchalk