Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow codecov upload with token on PRs from forks #1469

Closed
adrinjalali opened this issue Jun 4, 2024 · 3 comments
Closed

Allow codecov upload with token on PRs from forks #1469

adrinjalali opened this issue Jun 4, 2024 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@adrinjalali
Copy link

From v4, this action switches to tokenless upload when PRs are from forks (which is the case for ALL PRs I have in ALL projects I work in), and it means it fails due to the github limit.

For projects which don't care about exposing the token in plain text in the configuration (which is the case in many projects since it's a low risk token anyway), this action should allow users to use tokens in PRs from forks. This can be done with an explicit parameter maybe, but it should be allowed.

@MetRonnie
Copy link

Workflows running on the pull_request event from forks do not have access to repository secrets.

Is it not possible to just add the token in plaintext to the workflow YAML?

- uses: codecov/codecov-action@v4
  with:
    token: a1b2c3d4...

It's getting to the point where I am considering doing this, as we are getting

Tokenless has reached GitHub rate limit

extremely often nowadays.

@adrinjalali
Copy link
Author

@MetRonnie that's what we had in our repo. But v4 of this action now ignores that given token.

@thomasrockhu-codecov
Copy link
Contributor

@adrinjalali @MetRonnie we released a new version of the CLI/Action that should make this work now. I'm going to close for now, but if it's still a problem, please re-open/comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants