Skip to content

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

Merged
Alex Ross (alexr00) merged 1 commit into
microsoft:mainfrom
ypresto:fix-url-nested-repo
Apr 12, 2023
Merged

Fix wrong repo URL for nested repos in workspace (fix copy permalink)#4711
Alex Ross (alexr00) merged 1 commit into
microsoft:mainfrom
ypresto:fix-url-nested-repo

Conversation

@ypresto

@ypresto Yuya Tanaka (ypresto) commented Apr 10, 2023

Copy link
Copy Markdown
Contributor

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 Alex Ross (alexr00) added this to the April 2023 milestone Apr 12, 2023

@alexr00 Alex Ross (alexr00) left a comment

Copy link
Copy Markdown
Member

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
Alex Ross (alexr00) enabled auto-merge (squash) April 12, 2023 13:23
@alexr00
Alex Ross (alexr00) merged commit f945503 into microsoft:main Apr 12, 2023
@ypresto
Yuya Tanaka (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