Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gitpod CLI : add a find | search command #19312

Open
jeanphi-baconnais opened this issue Jan 10, 2024 · 3 comments
Open

Gitpod CLI : add a find | search command #19312

jeanphi-baconnais opened this issue Jan 10, 2024 · 3 comments

Comments

@jeanphi-baconnais
Copy link

Is your feature request related to a problem? Please describe

I use the Gitpod CLI in CICD and I would like to search in my workspaces if I have already one.

Describe the behaviour you'd like

A command like this could be great : gitpod workspace search -r <my-repo> -b <branch-to-search> with -R for repository and -b for branch 😅

Describe alternatives you've considered

Additional context

@jeanphi-baconnais jeanphi-baconnais changed the title Gitpod CLI : add a find command Gitpod CLI : add a find | search command Jan 10, 2024
@filiptronicek
Copy link
Member

Hi @jeanphibaconnais 👋, although searching is not possible now, and I think that we will go with a route of filter flags for workspace list instead, there is a way to filter workspaces with grep. Filtering via all the different columns' values sounds like a good feature for the future, though.

gitpod workspace ls | grep 'gitpod-io/gitpod.*main' | awk '{print $1}'

@loujaybee
Copy link
Member

Thanks for the feature request, @jeanphibaconnais ! ❤️ Out of curiosity what is the flow you're using from CI? What workspaces do you create? When and why do you create them? Trying to contextualise your request! 🙏

@jeanphi-baconnais
Copy link
Author

Thanks @filiptronicek for your response. Yes of course we can add grep instruction but if this is pertinent, getting this command in the CLI could be great 😅

@loujaybee , I am playing with the Gitpod CLI (I hope I can write a blog post to explain this in January). I prepare this project : https://gitlab.com/jeanphi-baconnais-experiments/playing-with-gitpod-cli
The aim is to create a Gitpod workspace when people create one issue in a project. When dev or changes are done, team member can remove the gitpod workspace.

But the last thing I have to do is to block the duplication of Gitpod workspaces. At each commit a new pipeline is running and a new Gitpod workspace is created. A search in the existing workspaces can allow me to avoid this behavior 😄

I am asking on another point of view : as a administrator of an organization, search a workspace could be useful no?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants