codacy-coverage-reporter icon indicating copy to clipboard operation
codacy-coverage-reporter copied to clipboard

Will the coverage upload be skipped only if `--skip` or `-s` is passed in?

Open valeriupredoi opened this issue 11 months ago • 3 comments

Hi folks, quick question please (sorry I got rid of the Issue template - too much faff for such a simple question): we are using the codacy cov uploader via CircleCI as orb ie:

orbs:
  coverage-reporter: codacy/[email protected]
  codecov: codecov/[email protected]

and noticed that the coverage upload is not skipped if the PR is from a forked repo (so the project API token is missing there), and fails with the obvious "project token missing" - do we have to explicitly have the --skip option turned on to allow for a skip in this case, and avoid a fail? Many thanks in advance! Cheers muchly :beers:

valeriupredoi avatar Apr 03 '24 13:04 valeriupredoi

Hi @valeriupredoi! You can use the skip parameter:

orbs:
  coverage-reporter: codacy/[email protected]
  codecov: codecov/[email protected]
  skip: true

lolgab avatar Apr 03 '24 13:04 lolgab

@lolgab sweet, many thanks, mate! Shall do's, cheers for the pointer :beer:

valeriupredoi avatar Apr 03 '24 14:04 valeriupredoi

@lolgab my apologies, mate - proves out were were indeed skipping with skip: true (my colleague @bouweandela looked a few lines down the config file, unlike me :rofl: ) - and still, the upload was tried and failed, but only after one merged main in the fork PR-ed branch, otherwise, before that, the upload was indeed skipped on the fork - any ideas? No rush, no major issue here, it's more like a curiosity :mag:

valeriupredoi avatar Apr 04 '24 14:04 valeriupredoi