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

[Bug]: Files in submodules cannot be opened on GitHub #592

Closed
Gewerd-Strauss opened this issue Sep 6, 2023 · 2 comments
Closed

[Bug]: Files in submodules cannot be opened on GitHub #592

Gewerd-Strauss opened this issue Sep 6, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@Gewerd-Strauss
Copy link

Describe the bug

When you setup a submodule in your vault and put a note into it, executing Open file on Github & Open file history on GitHub will fail. Instead of parsing the submodule to get the correct address to built on, the file is assumed to be located in the main repo - which is obviously not the case.

Relevant errors (if available) from notifications or console (CTRL+SHIFT+I)

No response

Steps to reproduce

  1. setup obsidian git with an existing repo and have a full sync cycle done
  2. create a submodule & push it to GH
  3. add a note in said submodule and push it to GH
  4. open the note in obsidian
  5. attempt to execute either Open file on Github or Open file history on GitHub.
  6. Notice that the run URL is pointing at nothing.

Expected Behavior

The plugin should notice if a note is in a submodule, figure out what repository the file is actually located in, get its base path and then assemble the path up to the file from there.

Addition context

No response

Operating system

Windows

Installation Method

None

Plugin version

2.22.0

@Vinzent03 Vinzent03 added the bug Something isn't working label Sep 7, 2023
@Gewerd-Strauss
Copy link
Author

Unfortunately, I can still reproduce this issue, using version 2.24.3.

Having a submodule data at <root>/assets/data/, containing <root>/assets/data/README.md, and attempting to execute Open file on Github will still run the URL https://github.com/%user-redacted%/%main_repo%/blob/master/assets/data/README.md, instead of https://github.com/%user-redacted%/%submodule_repo%/blob/master/README.md.

@Vinzent03
Copy link
Owner

The fix is not released yet, but will do so soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants