watermelontools / watermelon

🍉 Open-Source Copilot For Code Review
https://app.watermelontools.com
Apache License 2.0
145 stars 12 forks source link

"AI summary deactivated by" repo member on PRs made by other organization members in private repo #423

Closed ifgarces closed 8 months ago

ifgarces commented 8 months ago

Greetings,

I implemented Watermelon in two private repos of my GitHub organization (I have admin privileges) of the company I am working for. I did configure Watermelon properly, only granting access for these two specific repositories within my organization (see fig. 3). Everything works fine when I do the pull requests myself, as shown in fig. 1. However, when someone else in my organization (other GitHub user with read and write access and no privileged permissions to both of these repos) creates a PR, Watermelon says it is disabled for that user, without any further explanation. What could be the cause of this? Has anyone had this problem before?

Fig. 1: successful Watermelon PR summary

Fig. 1: successful Watermelon PR summary

Fig. 2: no Watermelon PR summary

Fig. 2: no Watermelon PR summary

Fig. 3: repository access for Watermelon

Fig. 3: repository access for Watermelon

ifgarces commented 8 months ago

P.D.: note the undefined that Watermelon outputs just before Have you starred Watermelon? at the end of image 2. This has happened always since I implemented Watermelon, about a month ago.

ifgarces commented 8 months ago

I noticed this is "fixed" when the contributor (the creator of the PR within my GitHub organization) installs Watermelon for their account. I believe this is not the correct approach, as it is not fitted for a big team, as every member would have to install Watermelon for their GitHub accounts.

Maybe this issue could convert into a feature request for addressing this problem. It would be necessary to make Watermelon work only with repository or organizational level permissions, and not for each creator of the PRs.

EstebanDalelR commented 8 months ago

Thank you @ifgarces ! I am working on this, my guess is that the promise that fetches the user token resolves after the org token and this overwrites the text to be written. If this is the case, expect this to be fixed and deployed by the end of the week, as I'm currently working on that.

EstebanDalelR commented 8 months ago

I've sent what seems to be a fix, when approved and deployed would you be up for closing this with a comment?

Also, on a side note, I'd like to buy you a coffee or beer for the report, care to send an email to info@watermelon.tools? @ifgarces

ifgarces commented 8 months ago

Hello @EstebanDalelR. Assuming that (A) the change was already applied to Watermelon Tools and (B) the application integration with my organization's repos are automatic and don't require any action from me (just to be precise), I have not noticed any change. We have one team member that has not yet installed Watermelon Tools in their account, and he made a PR minutes ago and the result is the same (AI Summary deactivated by, followed by his username).

If there is a log or similar you want from Watermelon I can provide from my organization's repositories, just let me know (I lack of much knowledge in GitHub applications/integrations, so I may be speaking nonsense).

ifgarces commented 8 months ago

My coworker at our GitHub organization did install Watermelon Tools in his account and now finally his PRs are scanned with this great tool, but the problem I mentioned doesn't seem to be solved; I don't think this issue should be closed.