Unable to add reviewers to PR

Issue #503 resolved
Juanpe Araque created an issue

Hi!

I have found this issue already resolved but it seems not to be the same. The issue talk about not being able to fetch users. Nonetheless I am able to fetch them, the problem is when I select the one I want to add and save I can never do it. I get an error in the UI saying

Error fetching users
Errors encountered while adding some reviewers to this pull request.

But I can find my self and click on me to be added, so the issue is not fetching. In fact, looking at the logs this is what it shows:

 Error: error updating reviewers: [object Object]

Not sure if this is an issue or something I need to modify. I am logging into Bitbucket with a personal token and that token has read permissions on projects and write permissions on repos.

I am marking it as a bug, although it might not be one.

Comments (9)

  1. Pramod Busam Account Deactivated

    @Juanpe Araque Could you enable Output curl commands for every API call option under General -> Debugging section in the extension settings and check the logs again and let us know if you see a better error message? (Make sure you are on the latest version of the extension v2.8.3)

  2. Juanpe Araque reporter

    Sure, here it is:

    [2020-10-27 07:40:20:741] curl -X PUT -H "Content-Type:application/json" -H "User-Agent:atlascode/2.x axios/0.19.2" 
    -H "Authorization:Basic TOKEN" 
    --data '{"version":3,"title":"[ANTS-1770] PR Title","description":"PR Descripcion",
    "reviewers":[{"user":{"name":"name_company.com"}}]}' 
    "https://stash.dev.company.com/rest/api/1.0/projects/analytics/repos/mycoolproject/pull-requests/701?markup=true&avatarSize=64" 
    [2020-10-27 07:40:20:741] ---------------------------------------------------------------------- 
    [2020-10-27 07:40:21:114]  Error: error updating reviewers: [object Object]
    

    I just modified some of the fields to hide the token or the email of the reviewer added. Nonetheless, the reviewer being added exists and it is a valid email, in fact it is shown in the drop down when adding it to select, so the extension finds it. But at the end it fails. As far as I know no one in my company is able to add reviewers… not sure why exactly.

    Thanks!

  3. Juanpe Araque reporter

    Hi, is there anything you can think of that can fix it? In case this is an issue from my side.

  4. Gregory Star Account Deactivated

    Hi Juanpe, I believe this is related to this issue, so I've created a custom fix that I'd like you to try out. If you go to https://bitbucket.org/atlassianlabs/atlascode/downloads/ you should see atlascode-2.8.4-bbissue-503.vsix. To run it, press on the VS Code extensions tab, then press the "..." button at the top and select "Install from VSIX". Finally, you should be prompted to reload.

    If that works for you then we'll release a new version of the extension with this fix in it promptly!

  5. Juanpe Araque reporter

    Hey, sorry for the delay. I was on holidays until today.
    I tried the update and it seems to be working perfect. I could add reviewers without any issue.

    Thanks!

  6. Log in to comment