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

[CY-4719] Error when running CI for Dependabot PRs #45

Closed
twschiller opened this issue Jul 13, 2021 · 3 comments
Closed

[CY-4719] Error when running CI for Dependabot PRs #45

twschiller opened this issue Jul 13, 2021 · 3 comments
Labels
jira-issue Issue tracked on JIRA

Comments

@twschiller
Copy link

Is there any special configuration/setup required for using with Dependabot?

We're getting the following error:

2021-07-12 22:27:35.255Z error [CodacyCoverageReporter] Invalid configuration: Either a project or account API token must be provided or available in an environment variable  - (CodacyCoverageReporter.scala:25)

And the relevant portion of our CI configuration:

name: Run codacy-coverage-reporter
uses: codacy/codacy-coverage-reporter-action@v1
with:
  project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
  coverage-reports: cobertura.xml
@github-actions github-actions bot changed the title Error when running CI for Dependabot PRs [CY-4719] Error when running CI for Dependabot PRs Jul 13, 2021
@github-actions github-actions bot added the jira-issue Issue tracked on JIRA label Jul 13, 2021
@github-actions
Copy link

Internal ticket created : CY-4719

@machadoit
Copy link
Member

Hi @twschiller, unfortunately there are some behaviours that changed regarding Dependabot, please check this compiled FAQ dependabot/dependabot-core#3253 (comment)

That said, here the concrete problem, is that the action triggered by dependabot cannot access your secrets.CODACY_PROJECT_TOKEN. On the FAQ, there are multiple options, although at the moment there are no perfect ones.

Alternatively, you can add a github.actor != 'dependabot[bot]' on your action, to avoid it getting triggered by dependabot.

@twschiller
Copy link
Author

Thanks, we're currently using github.actor != 'dependabot[bot]' and will continue to go that route

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
jira-issue Issue tracked on JIRA
Projects
None yet
Development

No branches or pull requests

2 participants