Trying to understand the scope of gitlab-cli
I've managed to authenticate to our self-hosted gitlab CE server and get some information out of it, but there doesn't seem to be any documentation of the CLI other than the 'help' output (is that correct?)
It seems like the CLI acts as a 1:1 wrapper around gitlab API v4 requests, so if I want to list all the projects, I have to keep invoking 'gitlab projects --page NNN' until it runs out, similarly for other information like issues. Are there more powerful capabilities of the API that would let it, for example, return all the projects in one command?
I'm not intending to rag on the CLI for not being something it's not, just to understand what it is capable of at present.
@oddhack, thanks for asking this question, it raises a very valid concern. Initially, this CLI was ought to target some use cases I had for myself (e.g. listing the pipelines for my projects). Those use cases were pretty easy to solve by just mapping commands onto API requests.
However, I'd love to evolve this CLI into something more valuable than just being able to call the GitLab API from your terminal. The --page parameter is a good example where we could improve in this regard, adding e.g. a caching layer, an --all parameter or sth. like that. Plus, there's definitely a bunch of use cases out there that would involve calling different API methods in sequence.
I must admit I'm not that of a hard-core GitLab user myself so I need some feedback and at best some use cases to satisfy with the CLI.
My plea to you here would be to formulate a use case (or several) that you'd like to see solved by the CLI and I/we could start working on implementing these.
Thanks! I'll try to describe what my intended use cases are. For reference I'm the release manager for the Vulkan specification (KhronosGroup/Vulkan-Docs on github, but much of our work is in our internal gitlab server) and am constantly rummaging through the issues and MR sections of gitlab keeping things moving along.
On a weekly basis, I assemble all the new and updated MRs and issues that we need to discuss to make progress. This is currently done by going to the gitlab server website and manually filtering by Label and Milestone, then summarizing that information in a wiki document which drives our conference calls.
So what would be helpful for me is being able to use the CLI to query open issues or MRs, regardless of which API page the results came from, and either pre-filter by Label / Milestones or return the Labels and Milestones as part of the query. I'd also want to return the issue / MR title and the assignee, if any. That would probably cut 15-20 minutes out of my weekly overhead - even more if there was some sort of structured query return to label the various results (tags, JSON, whatever - doesn't matter).
N.b. I unfortunately am not at all familiar with Go, so probably not in a position to assist much with this - if it happens that my use case is of interest I'd be very happy to try out anything you feel like doing with it, though, and report back.