Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inquiry about Git Web URL #15

Closed
nikkizhu1999 opened this issue Jun 24, 2024 · 6 comments
Closed

Inquiry about Git Web URL #15

nikkizhu1999 opened this issue Jun 24, 2024 · 6 comments

Comments

@nikkizhu1999
Copy link

nikkizhu1999 commented Jun 24, 2024

20240624-114850

Hi there, i want to replace the "doc" (which is the name of a project in GitLab) with parameters like "$ID". Do we have this? I would assume it is "$githubproject" or something, but it doesn't work

Looking forward to your reply, thanks! :)))

@solomonkinard
Copy link
Owner

If the online web url started from "https://example.com/doc/commit/", you'd be able to open the commit on the web by adding "$ID" at the end. But in your case you want to replace doc with a project. So the result would be "https://example.com/project/commit/$ID". It could be saved as a workspace only setting, like what's shown in the photo. Does that work, is this a bug, or a new feature request?

Screenshot 2024-06-24 at 00 12 08

@nikkizhu1999
Copy link
Author

nikkizhu1999 commented Jun 24, 2024

Hi solomonkinard,

Yes, it works. However, what should I do if I have more than one repository, such as doc, doc2, and doc3? Currently, I have to manually change the settings from "https://example.com/doc/commit/" to "https://example.com/doc2/commit/" when the file belongs to doc2. Is there a parameter or method I can use to automatically fill in the appropriate URL based on the file's repository?

@solomonkinard
Copy link
Owner

Your new feature request has been rolled into 0.2.22 for you to enjoy. Hopefully it solves your problem. Just add a ".gitblame" file anywhere you want - to replace variables. Here the format.

{
  "openOnline": {
    "url": "https://example.com/$PROJECT/$ID",
    "replacements": {
      "$PROJECT": "doc1",
      "wHaTeVeR u WaNt": "tO rEpLaCe",,
      ...
    }
  }
}

@phtty
Copy link

phtty commented Sep 28, 2024

This configuration file doesn't seem to support vscode variables, such as ${workspaceFolderBasename}, and hopefully this feature will be added to the settings to simplify some of the configuration work

@solomonkinard
Copy link
Owner

v0.2.57 now supports ${workspaceFolderBasename}. If others are requested, please comment on an open (or make a new) bug, stating exactly which ones are desired. If all 19 are wanted, please share why.

@nikkizhu1999
Copy link
Author

v0.2.57 now supports ${workspaceFolderBasename}. If others are requested, please comment on an open (or make a new) bug, stating exactly which ones are desired. If all 19 are wanted, please share why.

Thank you!

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

No branches or pull requests

3 participants