Codacy is not fetching Pull Requests from Github Repo

We have integrated the Codacy with Github and it works out of box for all repos.
However, we have observed a weird behavior of this integration.
We had a user who configured the Github Codacy integration and it was working as expected till the time user was a part of the organization.
That user recently left our organization and post that, we have observed that Codacy is not able to fetch the new Pull Requests from the repositories which were configured by the inactive user.
Due to this issue, We were not able to see the Codacy Status in PR Checks as well.

As a workaround, we removed the repo from Codacy and configured it again as it was done earlier. We can see that Codacy is able to fetch the PRs from Github and it is working as expected.

So, we have around 25+ repositories that are facing the same issue and we do not expect/want to rework in such situations.

Could you please look at this issue on a priority?

Hi there!

I will let you know that we have some ongoing conversations internally for alternatives and/or clarify the best way to overcome this issue. It is something that can happen and be a problem as you said.

On a comment on your workaround, instead of removing and adding again, you can go to the Settings → Integrations remove the GitHub integration, and then add it again. The repository integration will then rely on the token of the current logged in user.

So at the moment, the best workaround that we have, is for you to login on your account, or a service account on your organization, go to the repository settings, remove and re-add the GitHub integration for all of them, configuring the Status / Summary / Annotations and Suggestions as you see fit.

Sorry for the frustration this can bring, but on Codacy side, we do need to rely on a user token that integrated the repository to do some API calls regarding analysis and suggestions. Like I mentioned, we have some internal conversations on what and how can we improve this process. There is no ETA that I can share, but we will let you know when we have updates.

1 Like


In the meantime, we reflected this feedback on the documentation. Creating a service account is now mentioned while enabling the GitHub integration:

The following page includes all the details on how to change the Git provider integrations so that they use a dedicated service account: