Skip to content

Conversation

@ypresto
Copy link
Contributor

@ypresto ypresto commented Apr 10, 2023

For example I have workspace which contains git repos in below locations:

  • /foo
  • /foo/bar
  • /foo/bar/baz
  • /foo/qux

When I'm editing /foo/bar/abc.tsx, getManagerForFile() returns the Manager of /foo, not /foo/bar.
So I get wrong repo URL in "Copy GitHub permalink":

  • Expected: https://github.com/test-user/foo-bar/blob/...
  • Actual: https://github.com/test-user/foo/blob/...

With this PR, getManagerForFile() returns /foo/bar for above case.

Note this PR affects other features like issue number completion:

  • Before this PR, it shows issues in root repo (/foo)
  • After this PR it, shows issues in nested repo (/foo/bar)
@alexr00 alexr00 added this to the April 2023 milestone Apr 12, 2023
Copy link
Member

@alexr00 alexr00 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thank you for the fix!

@alexr00 alexr00 enabled auto-merge (squash) April 12, 2023 13:23
@alexr00 alexr00 merged commit f945503 into microsoft:main Apr 12, 2023
@ypresto ypresto deleted the fix-url-nested-repo branch April 19, 2023 08:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants