edgafner / dorkag

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

[BUG]: Actions not enabled after logging in #70

Closed thygesteffensen closed 2 months ago

thygesteffensen commented 4 months ago

Describe the bug None of the actions are available after logging in, the PAT is for all organisations.

To Reproduce Steps to reproduce the behavior:

  1. Go to settings
  2. Add account with PAT with full access to all orgs
  3. Save
  4. Create Pull Request

Expected behavior Actions are active, such as 'Create Pull Request'

Screenshots image image image

Desktop (please complete the following information):

JetBrains IDE (please complete the following information):

Azure Devops organization details:

Additional context Add any other context about the problem here.

Jonatha1983 commented 4 months ago

Hi @thygesteffensen

Did you Clone using ssh or http?

If http you need to uncheck the clone ssh in the configuration

thygesteffensen commented 4 months ago

I cloned using SSH :)

thyge@Thyges-MacBook-Pro ~/d/h/H2 > git remote -v
origin  git@h.ssh.dev.azure.com:v3/dev/DP/H (fetch)
origin  git@h.ssh.dev.azure.com:v3/dev/DP/H (push)

The remote url is prefixed with a name to use the correct SSH key

Jonatha1983 commented 4 months ago

And you opened a project from the got root?

Also check under settings>version control> git

If the checkbox of using credential is enabled/disabled

Jonatha1983 commented 4 months ago

It looks like you opened a project that is under GitHub and not under azure devops

thygesteffensen commented 4 months ago

And you opened a project from the got root?

Also check under settings>version control> git

If the checkbox of using credential is enabled/disabled

"Use credential helper" is disabled

thygesteffensen commented 4 months ago

It looks like you opened a project that is under GitHub and not under azure devops

It is a DevOps project :)

The solution file (given it is a dotnet project) is not located in the git root, but in src/. In Settings > Version Control > Directory Mappings the git root is noted.

image

Jonatha1983 commented 4 months ago

And the azd tool window is disabled?

thygesteffensen commented 4 months ago

Yes, I cannot see the tool windows as depicted in https://github.com/edgafner/dorkag/wiki/AZD%3A-AZD-Usage#viewing-pull-requests and the actions are all disabled. I can only see them when including disabled actions i the "actions prompt" in Rider.

There is no errors in the notification center either :)

thygesteffensen commented 4 months ago

I just cloned using HTTPs and it now works as expected :)

I'll try to clone with SSH without using a modified address :)

The check box ('Clone git repositories using ssh') was still checked though.

Jonatha1983 commented 4 months ago

In the first image you sent - you can see the the GitHub bundle plugin is enable - and for non GitHub repo this is disabled so something is really weird.

Let me know how it goes with new ssh.

Thanks again for reporting

thygesteffensen commented 4 months ago

Cloning the repo with the "original" ssh url also works.

Here is the steps for reproduction.

I have access to many different DevOps and with different users - so I will have multiple SSH keys and to streamline the process I do the following for all DevOps:

  1. ~/.ssh/config: Add the following for each new DevOps:

    Host ado1.ssh.dev.azure.com
      Hostname ssh.dev.azure.com
      User thyge@somewhere.com
        IdentityFile ~/.ssh/id_rsa_somewhere

    ado1 is just a custom identifier. id_rsa_somewhere is the SSH key generated and related to that specific DevOps. Add the public key in DevOps.

  2. Clone Navigate to the repo in DevOps and copy the SSH clone url. Modify it to match the url from the config. E.g., git@ssh.dev.azure.com:v3/org/project/repo becomes git@ado1.ssh.dev.azure.com:v3/org/project/repo.

  3. Open the project (solution) Now you cannot create/view pull requests even though you have logged in :)

Jonatha1983 commented 4 months ago

Yes in this case it will not work

Since I must make some assumptions like the url is of a certain format Ssh.dev.azure.com

This is a special case I ll add it to the backlog but user can really do everything they want so for example ado1.ssh can be a.b.c.d and I am not sure I can cover all the options.

Jonatha1983 commented 4 months ago

I ll investigate this anyway

thygesteffensen commented 4 months ago

Awesome, thanks 🚀

Yes. If you're using the git remote to check if the given repo is hosted on DevOps you could add a option to overwrite this and enable the extension anyway? (With a disclaimer that it ONLY works with DevOps repos?)

I cannot see why it wouldn't work when the remote is changed?


Out of curiosity I added a remote, such as: git remote add bogus <original-ssh-url> and now the extension is enabled and I can browse and create pull request ;) (But the remote bogus is mentioned in the UI sometimes, but the remote origin should be the one used by Rider and git.

So best option is to add this case as a "solution" to the docs?

I still had the ssh key assigned to the 'default' url. So this does not work.

I can browse pull request, edit them (All actions where the PAT is used?) I cannot create a pull request.

thygesteffensen commented 4 months ago

image

Jonatha1983 commented 4 months ago

You can create but it is telling you that there is no branch on the remote When you create it will ask you if you want to create a branch on the remote before creating This is the default behavior for the GitHub and gitlab jetbrains bundle plugin.

bostandyksoft commented 3 months ago

Hi. I'm not sure that is it same bug, but after login my tool icon is missing now image Also actions are not available

Jonatha1983 commented 3 months ago

@bostandyksoft Did you opened the project from the local azure devops for repo? Is it a Azure devops service or server?

bostandyksoft commented 3 months ago

I'm not sure that clearly understand question. We have own server with Azure Devops (it is'nt cloud)

Jonatha1983 commented 3 months ago

@bostandyksoft I think the just released version contains the fix for this issue.

Please let me know if not.

thygesteffensen commented 3 months ago

@Jonatha1983

I re-authenticated with a full-access PAT and checked 'Clone git repositories using ssh'.

Actions from AZD are still un-available.

Please let me know if you need anything else.

I'm using JetBrains version: 2024.1 and AZD version: 2024.1.53

Jonatha1983 commented 3 months ago

@thygesteffensen Yeah, I found a bug caused by changes in one of the Azure DevOps API responses.

I am releasing a version as soon as possible. Sorry about it - will update once released.

Jonatha1983 commented 3 months ago

@thygesteffensen The version with the fix was approved by Jetbrains marketplace: https://plugins.jetbrains.com/plugin/22319-azd/edit/versions/stable/523303

thygesteffensen commented 3 months ago

@Jonatha1983 Awesome, but still no luck...

I upgraded Azd to version 2024.1.57 image

Rider is still 2024.1

It's the same behaviour as before. When/If I add a new remote with a "standard" Azure DevOps url, the actions are enabled. But when I use the "proxied" version to separate SSH keys, the actions are not enabled.

My remote: git@org1.ssh.dev.azure.com:v3/org1/project1/repo1 Original remote: git@ssh.dev.azure.com:v3/org1/project1/repo1

This is configured in the .ssh config file :)

Jonatha1983 commented 3 months ago

Yes still need to tackle that case - I am keeping this ticket open for now. Will update.

Jonatha1983 commented 3 months ago

@thygesteffensen Hi

The last available version should include a fix for your git remote config case.

Please let me know if it does/doesnt

And if it does and all is working as you expect I would appreciate a nice review or a nice star rate (if didn't already) 🙏🏻

https://plugins.jetbrains.com/plugin/22319-azd

Thanks

Jonatha1983 commented 3 months ago

Once you confirm I ll close the issue.

bostandyksoft commented 3 months ago

I still dont have any icons on my toolbar

Jonatha1983 commented 3 months ago

@bostandyksoft can you share some details?

When you fill up the server url - did you include the Collection name? Are you using ssh or https? Did you change the git configuration some how? If you are using ssh, Are you using a different port instead of 22? Can you send me the pattern of your server, for instance is it of this form: Https://a.b.c.com/collectionName ?

Jonatha1983 commented 3 months ago

If you can please open a different ticket with those details because I am not sure it is related to the original.

TonyCasey commented 3 months ago

I have the same issue with the icon not showing. I've tried the suggestions above but still having the issue..

Interestingly when I un-checked the "Clone git repositories using ssh" then I lost the Pull Requests & Work Items tabs.

image

I update Rider to the latest version, then lost the tabs again until I switched OFF the "Clone git repositories using ssh"

image
Jonatha1983 commented 3 months ago

Hi @TonyCasey

When you run in the terminal: git remote -vv

Do you see ssh or https? In the case of SSH, this checkbox should be enabled In the case of HTTP, it should be disabled, but under Settings > Version Control, make sure the Use credential helper is enabled. image

The two tabs in the git tool window are from the other plugin you installed, so they are not related. Honestly, I am not sure how the IDE will work when both are installed. image

Please let me know how it goes - and in case you still need help please open a new ticket with some more details.

Thanks

TonyCasey commented 3 months ago

Thanks, I've done the suggested but still the same. I'll open a new ticket with some screenshots

thygesteffensen commented 2 months ago

@thygesteffensen Hi

The last available version should include a fix for your git remote config case.

Please let me know if it does/doesnt

And if it does and all is working as you expect I would appreciate a nice review or a nice star rate (if didn't already) 🙏🏻

https://plugins.jetbrains.com/plugin/22319-azd

Thanks

Yes, it is working now - Thanks, looking forward to use it :)