wakapi
wakapi copied to clipboard
Feature request: Add label to many projects at once
I really like the project label feature, and I use it quite a bit:

I recently started working at a new company, which means working with more than 25+ new repositories within the last months. I want to label these projects as "Company" but doing so one-by-one is quite tedious.
Simple QOL request, it would be awesome if we could do something like:

That way, you can do it once instead of picking Project / Label and hitting save 25 times
Thanks, I see how this will be beneficial. I'll add it as a feature request with not-so-high prio.
Hello @muety I would like to work on this.
This is what I came up with

So as far as I can see, every time a new label is added in the current UI, a new ProjectLabel model is created associated with the ProjectKey. In which case the above UI might not be possible.
In that case, the UI can be reduced to this:

Correct me if I am wrong, but there does not seem to be any existing model that stores projects explicitly. They are just stored as string in the heartbeat model.
Hi @IgnisDa, thanks a lot for these very elaborate thoughts! I really like the concept you came up with. Feel free to give it a go!
To give you a couple of hints as a guideline (without having fully thought through this): you'll probably have to adapt the adtionAddLabel() handler (sorry, the settings.go is pretty messy, I have a to-do on my list to split the settings up into separate pages) to accept an array of values for key and value, instead of only a single one. See here (and potentially here). Try to use as little JavaScript as possible, but of course as much as needed.
Correct me if I am wrong, but there does not seem to be any existing model that stores projects explicitly. They are just stored as string in the heartbeat model.
Yep, that's right, projects are simply identified by their plain name strings (same for languages, editors, etc.).
Will work on this.
Can you tell me the normal development workflow you follow? I run go run . -- --config config.yml in the project root. When I make a change to the go code, I have to restart the server and have to login again in the browser. Is there a way to circumvent this?
Yes, exactly. That's my current development workflow. If you wanted to circumvent having to re-login each time, you could probably set the securecookie's secrets to some constant string, instead of a random value.
Can you tell me which setting in this table? https://github.com/muety/wakapi#-configuration-options
There's no setting for that, you'd have to do it in code here. But I always just re-logged in every time again.
Would be useful for development if we make that configurable via an env variable.
Agree! Created #463 for this.