wakapi icon indicating copy to clipboard operation
wakapi copied to clipboard

Feature request: Add label to many projects at once

Open notarock opened this issue 3 years ago • 1 comments

I really like the project label feature, and I use it quite a bit:

image

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:

wakapi-projects-picker

That way, you can do it once instead of picking Project / Label and hitting save 25 times

notarock avatar May 05 '22 15:05 notarock

Thanks, I see how this will be beneficial. I'll add it as a feature request with not-so-high prio.

muety avatar May 07 '22 06:05 muety

Hello @muety I would like to work on this.

IgnisDa avatar Jan 24 '23 00:01 IgnisDa

This is what I came up with

Untitled-2023-01-24-0716

IgnisDa avatar Jan 24 '23 02:01 IgnisDa

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:

Untitled-2023-01-24-0716

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.

IgnisDa avatar Jan 24 '23 02:01 IgnisDa

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.).

muety avatar Jan 24 '23 09:01 muety

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?

IgnisDa avatar Jan 24 '23 09:01 IgnisDa

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.

muety avatar Jan 24 '23 09:01 muety

Can you tell me which setting in this table? https://github.com/muety/wakapi#-configuration-options

IgnisDa avatar Jan 24 '23 10:01 IgnisDa

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.

muety avatar Jan 24 '23 10:01 muety

Would be useful for development if we make that configurable via an env variable.

IgnisDa avatar Jan 24 '23 11:01 IgnisDa

Agree! Created #463 for this.

muety avatar Jan 24 '23 23:01 muety