Skip to content

Copy GitHub __ Link actions from file/share menu copy links with file paths and line ranges #4598

Closed

Description

@joyceerhl
  1. Open a GitHub repo with the stable version of GHPRI installed
  2. Open the File > Share menu
  3. Copy GitHub Permalink, Copy GitHub HEAD Link, or Copy GitHub Permalink as Markdown
  4. 🐛 the active file path and line are included

We special-cased the file menu's behavior for copying vscode.dev links in the builtin GitHub extension and the Remote Repositories extensions to not copy the file path or line, so GHPRI's contributions to file/share are inconsistent (this is not a regression from the changes just checked into main). However Raymond Zhao (@rzhao271) and Aaron Munger (@amunger) had feedback that the file/share behavior was not what they expected, I think they expected it to relate to the active editor, in which case we would keep GHPRI's current behavior and change the vscode.dev link behavior.

Whatever we do here we should be consistent across all the copy link commands so I'm opening this issue to discuss the desired behavior.

Activity

  1. added
    under-discussionIssue is under discussion for relevance, priority, approach
    bugIssue identified by VS Code Team member as probable bug
    and removed
    under-discussionIssue is under discussion for relevance, priority, approach
    on Mar 8, 2023
  2. alexr00 commented on Mar 14, 2023

    @alexr00
    Member

    Joyce Er (@joyceerhl) have you come to any conclusions on whether to include the file + line number when using commands from the File > Share menu?

  3. joyceerhl commented on Mar 14, 2023

    @joyceerhl
    ContributorAuthor

    I think we should not include the file and line number for now. However there was a good suggestion to consolidate the share submenus as a single contribution point in microsoft/vscode#176316, and if we did this then we'd be able to remove a lot of the duplicated commands in favor of a single command which behaves differently depending on the passed arguments.

  4. alexr00 commented on Mar 17, 2023

    @alexr00
    Member

    Looks like microsoft/vscode#176316 is in flux. Moving out of the March milestone.

  5. alexr00 commented on Dec 9, 2025

    @alexr00
    Member

    Closing, we'll keep the file and lines.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugIssue identified by VS Code Team member as probable bug

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions