Skip to content

Don't upload codecov for dependabot runs#43

Merged
ejfine merged 1 commit intomainfrom
codecov
May 9, 2025
Merged

Don't upload codecov for dependabot runs#43
ejfine merged 1 commit intomainfrom
codecov

Conversation

@ejfine
Copy link
Contributor

@ejfine ejfine commented May 9, 2025

it can't access secret

@ejfine ejfine requested a review from Copilot May 9, 2025 18:57
@ejfine ejfine self-assigned this May 9, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR prevents Codecov from uploading coverage during dependabot runs since dependabot cannot access the required secret.

  • Adds a condition to skip the Codecov upload step when the actor is dependabot.

{% endraw %}{% if use_codecov %}{% raw %} - name: Upload coverage to Codecov
# only upload coverage from fastest job
if: matrix.JOB_MATCHING_DEV_ENV == true
if: matrix.JOB_MATCHING_DEV_ENV == true && ${{ github.actor != 'dependabot[bot]' }} # dependabot by default doesn't have access to the necessary secret...and dependabot should never be changing coverage anyway so it's fine not uploading it
Copy link

Copilot AI May 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Consider simplifying the condition by directly using matrix.JOB_MATCHING_DEV_ENV if it's a boolean. Also, ensure that the combined expression's evaluation order is as intended; wrapping expressions in parentheses for clarity may improve maintainability.

Suggested change
if: matrix.JOB_MATCHING_DEV_ENV == true && ${{ github.actor != 'dependabot[bot]' }} # dependabot by default doesn't have access to the necessary secret...and dependabot should never be changing coverage anyway so it's fine not uploading it
if: (matrix.JOB_MATCHING_DEV_ENV && ${{ github.actor != 'dependabot[bot]' }}) # dependabot by default doesn't have access to the necessary secret...and dependabot should never be changing coverage anyway so it's fine not uploading it

Copilot uses AI. Check for mistakes.
@ejfine ejfine merged commit a938714 into main May 9, 2025
9 checks passed
@ejfine ejfine deleted the codecov branch May 9, 2025 19:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants