Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 7, 2025

PR #7900 made the extension ignore repositories outside workspace folders, breaking workflows where users open files from local dependencies (e.g., Go projects) that are git repos but not in the workspace.

Changes

  • New setting: githubPullRequests.allowReposOutsideWorkspace (boolean, defaults to false)

    • When enabled, repos outside workspace folders are managed by the extension
    • Requires window reload to take effect
  • Implementation: Added setting check before workspace folder validation in extension.ts

    const allowReposOutsideWorkspace = vscode.workspace.getConfiguration(PR_SETTINGS_NAMESPACE)
      .get<boolean>(ALLOW_REPOS_OUTSIDE_WORKSPACE, false);
    if (!allowReposOutsideWorkspace && workspaceFolders && !workspaceFolders.some(...)) {
      Logger.appendLine(`Repo ${repo.rootUri} is not in a workspace folder, ignoring.`, ACTIVATION);
      return;
    }

Default behavior unchanged for backward compatibility. Follows the same pattern as ignoreSubmodules setting.

Original prompt

This section details on the original issue you should resolve

<issue_title>Add a setting to stop ignoring repositories that are outside of the workspace</issue_title>
<issue_description>

  • Extension version: latest (0.120.2)
  • VSCode Version: 1.105.1
  • OS: Windows 11 25H2, running on ubuntu 20.04 via Remote-SSH
  • Repository Clone Configuration (single repository/fork of an upstream repository): single repository
  • GitHub Product (GitHub.com/GitHub Enterprise version): GHE 3.14.8

Steps to Reproduce:

  1. Open a Go project
  2. Open a file from a local dependency of said project
  3. Source control recognizes this as a valid submodule and adds it to the panel
  4. But the submodule is missing the "Create PR" button
  5. The submodule also does not list on panels like Pull requests, Issues etc.

This was introduced by #7900 and is not seen in older versions like 0.118.2. I have verified that the "ignoreSubmodules" setting is disabled. Also found this log(framework is the submodule btw):

2025-11-03 08:55:35.569 [info] [Activation] Repo file:///root/vega/framework is not in a workspace folder, ignoring.

</issue_description>

Comments on the Issue (you are @copilot in this section)

@alexr00 > Open a file from a local dependency of said project

Can you describe how the file is a local dependency? Is it git submodule? </comment_new>
<comment_new>@alexr00
This is the expected behavior then. We only detect git submodules. Sounds like I need to add a setting which allows the extensions to not ignore repos that were opened from outside the workspace...</comment_new>


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI self-assigned this Nov 7, 2025
Copilot AI changed the title [WIP] Add setting to stop ignoring repositories outside of workspace Add setting to allow managing repos outside workspace folders Nov 7, 2025
Copilot AI requested a review from alexr00 November 7, 2025 15:00
Copilot finished work on behalf of alexr00 November 7, 2025 15:00
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.

Add a setting to stop ignoring repositories that are outside of the workspace

2 participants