Skip to content

feat: add Open on GitHub and Copy GitHub link to file context menu - #33

Merged
rhoades-brown merged 2 commits into
mainfrom
feat/github-url-context-menu
Aug 29, 2026
Merged

feat: add Open on GitHub and Copy GitHub link to file context menu#33
rhoades-brown merged 2 commits into
mainfrom
feat/github-url-context-menu

Conversation

@rhoades-brown

Copy link
Copy Markdown
Owner

Closes #32

Summary

Adds two new items to the file right-click context menu:

  • Open on GitHub — opens the file's GitHub blob URL in the default browser
  • Copy GitHub link — copies the GitHub blob URL to the clipboard

Both items correctly resolve which repository owns the file (main repo vs additional repos) and account for subfolder path mapping and branch configuration.

Changes

  • main.ts — Added toRepoPath() helper and resolveGitHubUrl() method to determine the correct GitHub URL for any vault file. Registered file-menu event to inject context menu items.
  • src/views/SyncView.ts — Refactored private toRepoPath() to delegate to the shared plugin.toRepoPath() method.
  • tests/views/SyncView.test.ts — Updated mock plugin objects to include the new toRepoPath method.

Testing

  • All 124 tests pass
  • Build compiles cleanly

@rhoades-brown
rhoades-brown merged commit 01ac6cc into main Aug 29, 2026
5 checks passed
@rhoades-brown
rhoades-brown deleted the feat/github-url-context-menu branch August 29, 2026 21:37
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.

feat: add 'Open on GitHub' and 'Copy GitHub link' to file context menu

1 participant