sourcegraph / app

Issue tracker for the Sourcegraph app - a lightweight single-binary version of Sourcegraph for your local machine
27 stars 2 forks source link

IntelliJ -> Cody App doesn't work when git repository has 2 sublevels #63

Open agxs opened 10 months ago

agxs commented 10 months ago

For a while I couldn't get the IntelliJ plugin to connect to the local Cody app for my application.

My project is hosted in a self-hosted gitlab instance, and the repository structure is "gitlab/project/subproject/repo".

In the Cody App when indexing this app, the name of the project (eg in the context dropdown below the question section) would always show as "subproject". In IntelliJ on the Cody tab, there would always be an error at the bottom of the panel saying " repository is not set up in the Cody App".

I believe the problem is the app is referring to the project by the "subproject" name instead of the "repo" name.

I confirmed this by moving my repository up a level so the structure looks like "gitlab/project/repo". When I did this, the IntelliJ plugin correctly connected to the Cody App.

Note, I did not change my filesystem layout or my IntelliJ module layout. The only thing I changed was the remote git path to not include a subproject name. Also, I'm adding the repository as a local repository using the "Add a repository" button and selecting the root directory of my repository.

Setup:

dangson commented 10 months ago

I'm running into a similar issue, but with a period in my project name. So I have a project in a folder in the format project.domain.com. The Cody app thinks this project is called project, but the IntelliJ plugin thinks it's called project.domain.com. The plugin displays the same "repository is not set up in the Cody App" error.

@agxs, perhaps this issue would get more traction if it were created in the sourcegraph/sourcegraph issues tracker. That's where the plugin homepage links to under "Issue Tracker".