MergeCost

Troubleshooting

The most common problems and how to fix them. Still stuck? Contact support with the repository and PR number.

No comment appears on my pull request

  • Check the MergeCost job in the PR’s Checks tab. A green job with “no significant cost change” posts no comment unless comment_on_no_change: true.
  • Pull requests from forks are skipped: GitHub does not give forks access to repository secrets.
  • The workflow needs pull-requests: write permission (the generated workflow sets it).

“No endpoints measured yet”

Your tests made no HTTP requests to the app. MergeCost measures endpoints called through a test client (Django client, FastAPI/Starlette TestClient, Flask test_client(), supertest, fastify.inject). Add at least one such test, and check that test_command in .mergecost.yml runs it. See supported stacks.

“MERGECOST_API_KEY is not set” or “key was rejected”

  • The secret must be named exactly MERGECOST_API_KEY (repository Settings → Secrets and variables → Actions).
  • Keys can be revoked in the dashboard; create a new CI key on the repository page, or re-run automatic setup.

“Trial has ended or the plan limit is reached”

Choose a plan in Billing. Trial: 1 repository and 500 runs; Team: 3 repositories and 2,000 runs per month; Growth: unlimited repositories and 20,000 runs.

Tests fail in the MergeCost job but pass in my CI

  • Missing services: copy the services: block (Postgres, Redis, …) from your existing workflow into the MergeCost job.
  • Missing environment variables: add the same env: your CI uses.
  • Different install command: adjust the “Install dependencies” step.
  • Dependencies changed between base and head: set base_install_command, e.g. pip install -r requirements.txt or npm ci.

Findings show “—” instead of dollars

The endpoint has no traffic. Add it under traffic, set default_requests_per_day, or install the traffic SDK. Database findings also need database.monthly_cost.

Requests show as <unresolved>

The framework’s route template could not be read (for example Koa or Next.js route handlers). Those requests are ignored in the estimate. See what is not supported yet.

Node: no requests recorded with Jest or Vitest

Wrap your test config with withMergeCost(...) as shown in Jest and Vitest configuration. Automatic setup does this for CommonJS jest.config.js; ESM or TypeScript configs need the one-line change by hand.

The job takes twice as long as my tests

MergeCost runs your tests on both commits. The base result is cached by commit, so further pushes to the same PR only re-run the head. Narrow test_command to your API tests to speed it up.