Pull request on GitHub is not decorated, even though it worked before

pull-request

(Clover) #1

Hello everyone,

We set up a repository containing a Maven project that is built with Travis CI. I had successfully managed to make a ‘bot’ member of our GitHub organization review a pull request by generating an access token for it and registering it with our project on SonarCloud. However, it stopped decorating later pull requests, I’m not sure why.

We did change the artifactId of the project, but I updated the project key on SonarCloud, and I later even deleted the entire project on SonarCloud and recreated it. Travis successfully triggers code analysis, and pull requests appear in SonarCloud just fine. I set up the project to publish to GitHub and I double checked the repository ID and the access token of the bot account. I also have the permissions set up correctly, I didn’t change those since it worked the first time.

Anyone know how I can debug this?


(Clover) #2

Update: I completely deleted the access token from GitHub, generated a new one and registered that one with SonarCloud. I pushed a new commit that fixed a load of code smells, and after waiting for a while it appears that the bot has now commented on the PR.

I don’t know whether it was the new access token that did the job, or whether SonarCloud has troubles commenting when there are many code smells (80+), but it’s working again.

If someone has some light to shed on the situation I would still be very appreciative.


(Fabrice Bellingard) #3

By the way, you no longer need to have a dedicated “bot” member and to use one of its tokens: you simply need to install the SonarCloud GitHub app on your organization, and that’s it. I’ve realized that this is:

All that to say, here’s what I’d advise you to do:

  1. install the SonarCloud GitHub app on your organization(s)
  2. remove the GitHub tokens you specified on SonarCloud