Projects onedev server Issues #873
#873  VSCode - Gitlens -> Onedev integration
Open
Daniel Gollings opened 2 months ago

Was used to having automatic 'copy as -> copy remote file url` integration in VS Code for quick links to team members

For example:
https://code.onedev.io/projects/160/files/8b8cf005fcf967ae695fbf6a2144de9d2916a12a/pom.xml?position=source-15.3-15.85-1

Before I spend time on figuring out how to create a custom one, do you happen to know if Onedev has a similar style to for example GitHub or if there's a compatible API already?

Here's the same line in GitHub for example:
https://github.com/theonedev/onedev/blob/main/pom.xml#L15

Two things stand out, project number (160) vs name (theonedev/onedev) and line/char (15,3) positions instead of simply line (15) which might make a 'simple' custom config more difficult

And the integration config:
https://github.com/gitkraken/vscode-gitlens#remote-provider-integration-settings-

Robin Shen commented 2 months ago

On why using id instead of name in url, please check this discussion:
https://code.onedev.io/projects/160/issues/458

For the line referencing syntax, I will improve it to allow specifying line number only.

Daniel Gollings commented 2 months ago

Thanks, I understand the reasoning for id vs name. But the git integration stuff doesn't have an id. So either the clone command (origin url) needs to start using id instead of name or something needs to translate the https/ssh URL to the correct project (as something clearly does now)

assuming
ssh://code.onedev.io:6611/onedev/server
The URL would be something like
https://code.onedev.io/onedev/server/blob/8b8cf005fcf967ae695fbf6a2144de9d2916a12a/pom.xml#L15

is the latter, and in particular the onedev/server part currently possible (you've already addressed the line number part)

issue 1 of 1
Type
New Feature
Priority
Normal
Assignee
Issue Votes (0)
Watchers (4)
Reference
issue onedev/server#873
Please wait...
Page is in error, reload to recover