git-workspace icon indicating copy to clipboard operation
git-workspace copied to clipboard

Allow specifying individual repos

Open jayvdb opened this issue 4 years ago • 5 comments

While it is very useful to manage all repos in an org together, most of my orgs have too many repos, including many I am not interested in.

It would be nice if individual repos can be supported.

jayvdb avatar Apr 30 '21 04:04 jayvdb

The idea behind this tool is that disk space is cheap, and you may indeed want to switch between repos you're not currently interested in at a future point in time. I've got about 1085 repos cloned locally from my company, using relatively little space when compared to something like my Docker daemon. Being able to jump between them all without thinking is invaluable to me.

I see you're in a lot of Github organisations, so this is maybe not as useful to you. What kind of interface are you thinking for specifying the repos? There's no technical reason why we couldn't allow adding arbitrary git repos 🤔

orf avatar Apr 30 '21 14:04 orf

Diskspace isnt my concern. The time to fetch them all, and then regularly update them all, that is my primary concern. I cancelled the workspace update at about 3% because of this.

I would be happy enough manually editing workspace.yoml to be honest. An add github org/repo CLI would be useful of course. The same should work for gitlab of course, except that it gets a bit more tricky with gitlab which have extra levels. IMO the toml records need to explicitly say when it is a repo record, as using the API to determine org vs repo URLs is inefficient.

The other way for specifying repos that I would use is an import mechanism, one URL per line, so it can include github and gitlab and others. Then I can generate that input file using other tools.

jayvdb avatar Apr 30 '21 22:04 jayvdb

Individual repos, filters. Even add repositories to "list" by local scan.

The tool on github even fetch and track all repos I did participated in (frequently deprecated but mostly repos of other users, not mine)

CC @orf

epcim avatar Feb 04 '22 20:02 epcim

  1. You could add a dir provider, e.g. git workspace add dir /path/to/repo
  2. You can also allow specifying a path and recurse to discover ad-hoc repositories, e.g. git workspace fetch . (discover repos in current path), git workspace fetch /path/to/projects (discover projects in path)

rafi avatar Mar 14 '23 14:03 rafi

We have about 1500 repos and for security concerns I do not want to have them all on my laptop. However, I need repos which all start with a certain name, e.g. 'service-.*' .

I've tried --exclude '^service-.*' which didn't work.

Adding an --include option which supports a regular expression and can be specified multiple times analogous to the --exclude option should do the trick.

magiconair avatar Jan 04 '24 23:01 magiconair