codacy / codacy-coverage-reporter

Multi-language coverage reporter for Codacy
https://www.codacy.com
Other
134 stars 94 forks source link

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

Open valeriupredoi opened 6 months ago

valeriupredoi commented 6 months ago

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/coverage-reporter@13.16.5
  codecov: codecov/codecov@3.2.5

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:

lolgab commented 6 months ago

Hi @valeriupredoi! You can use the skip parameter:

orbs:
  coverage-reporter: codacy/coverage-reporter@13.16.5
  codecov: codecov/codecov@3.2.5
  skip: true
valeriupredoi commented 6 months ago

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

valeriupredoi commented 6 months ago

@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: