Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix wrong repo URL for nested repos in workspace (fix copy permalink) #4711

Merged
merged 1 commit into from
Apr 12, 2023

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants