Closed szczepaan closed 1 year ago
You have many git repos with the same name? Historically we solved this by creating a .wakatime-project
file in the repo to customize the project name. Git repo takes precedence, then we fall back to the IDE's solution/project name if the Git repo isn't detected. That's to standardize the project name across all IDEs including ones that don't know about the Jetbrains IDE project.
For your use case, we could add a setting to ~/.wakatime.cfg
that changes the default behavior. I'm not aware of a remote URL in Jetbrains projects. Do you mean the Git remote?
@alanhamlett
You have many git repos with the same name?
I think it's a common case when repos are called popular names like cms, android, etc. for example in some project groups.
Do you mean the Git remote?
yes
Can You tell me if I understood correctly the project name is calculated with this priorities
?
New setting in .wakatime.cfg file wouldn't solve the problem, because the problem is repo name itself, that why I suggested git remote as default project name (maybe setting for that, if it should be git remote or repo folder name (like now))
Please let me know if this feature could be added ?
Kind regards
2. repo name if .wakatime-project is detected.
The repo name is always used when no .wakatime-project
file is detected. That file is just a way to overwrite the detected project with a custom user-defined project name.
We can definitely add this feature, so if enabled the project name would be for ex: wakatime/jetbrains-wakatime
because github.com:wakatime/jetbrains-wakatime
is too long imo.
yes wakatime/jetbrains-wakatime
that's exactly what I'm thinking about.
It would be great. Please do let me know when it's available.
Many thanks
Restarting your IDE should get the updated wakatime-cli, then add these lines to your ~/.wakatime.cfg
file to use the Git Remote as your project name for all projects:
[git]
project_from_git_remote = true
hello, thank You, will it also work in Android Studio etc?
Kind regards
Yes, the ~/.wakatime.cfg
is used by all Jetbrains WakaTime plugins including Android Studio.
Is it possible to change the plugin to get remote URL to be default project name, or maybe full path to the project name. If so how to do it? I'm looking for a scenario where no local changes are needed by the developer.
The problem is that many projects can have the same name, so its impossible to identify them just by the project name on git.