edgafner / dorkag

Issue Tracker repository for all Dorkag plugins
Other
5 stars 0 forks source link

[BUG]: 404 Error when viewing pull requests for successfully connected user account #62

Closed arenglish closed 3 months ago

arenglish commented 7 months ago

Describe the bug Viewing pull requests fails with a 404 error. The request URL in the error message seems to be appending the full repository path ({company}.visualstudio.com/{respository-name}) to the account url (https://{company}.visualstudio.com) resulting in https://{company}.visualstudio.com/{company}.visualstudio.com/{respository-name} causing a 404.

To Reproduce Steps to reproduce the behavior:

  1. Open Rider project from VCS (login with VCS account during this process).
  2. Configure AZD user account for repository using "all available organizations" PAT.
  3. See error in account info after logging in (See Img. 1);
  4. See error in AZD toolbar tab when trying to view pull requests (See Img. 2).

Expected behavior Should show pull requests. Should probably fetch from https://{company}.visualstudio.com/{repositoryName} rather than https://{company}.visualstudio.com/{company}.visualstudio.com/{respository-name}, but I'm not sure what is causing the latter.

Screenshots

Image 1

image

Image 2

image

Desktop (please complete the following information):

JetBrains IDE (please complete the following information):

Azure Devops organization details:

Additional context I created this Rider project initially using the Rider "from VCS" option. This perhaps has something to do with the URL being improperly formed.

Jonatha1983 commented 7 months ago

Did you checked/unchecked the clone with ssh when you used the clone from vcs code?

Also the Pat was created with all the mandatory scopes?

Last question - the AZURE DEVOPS server version?

I will investigate this issue on the plugin side and will update as soon as possible

Thanks for reporting @arenglish

Jonatha1983 commented 7 months ago

It feels like missing scopes - maybe related to the restricted branches

I will investigate further

arenglish commented 7 months ago

Hi @Jonatha1983,

Jonatha1983 commented 7 months ago

Thanks @arenglish for sharing.

From the image you attached it looks like you are using server - service url is always fix: dev.azure.com While yours url have quickt and visual studio from the image above.

Are you using ssh to clone the repo usually or https ? If ssh you should check the ssh checkbox.

Jonatha1983 commented 7 months ago

From last image it looks like you are right and it is Service - so I wonder why the host is not https://dev.azure.com/... Maybe you use a different configuration or aliases for redirecting the url ?

arenglish commented 7 months ago

@Jonatha1983 It looks like we are using some kind of old URL scheme.... in the settings, it has an option to update to a "new URL"... image

Jonatha1983 commented 7 months ago

Oh - nice catch I ll try to support this in the next release Thanks for reporting

arenglish commented 7 months ago

@Jonatha1983 Okay thanks a lot! I will keep an eye out for it.

awindillman commented 7 months ago

This one is hitting us as well. Very interested to try to tool. Is there a workaround in the interim?

Jonatha1983 commented 7 months ago

Will release a new version on Monday with the support of this scenario

awindillman commented 7 months ago

Let me know if you need someone to test the fixes... If it works well this plug-in will plug (pardon the pun) a big hole left when we moved to Azure DevOps.

Jonatha1983 commented 7 months ago

Hi @awindillman @arenglish

I uploaded to the EAP channel a version that should work for your case:

Version 2024.1.28

https://plugins.jetbrains.com/plugin/22319-azd/edit/versions/eap

Just so you know, you must remove the old user if you have one - I tested this multiple times with different scenarios. I am pretty sure it should work well for your scenario, but please let me know if not.

Thanks

Jonatha1983 commented 7 months ago

Waiting for your input to close this

awindillman commented 7 months ago

The changes appear to be working for me. It will probably be a day or two for me to get to try all aspects though.

Jonatha1983 commented 7 months ago

Great 😊!!! Thanks will keep the issue open for now

Jonatha1983 commented 3 months ago

@awindillman @arenglish I am closing this issue.

Please open a new one if this issue still needs to be resolved.