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

project type filter for ddev list command (ddev list --type=) #4613

Merged
merged 6 commits into from
Apr 14, 2023

Conversation

cmuench
Copy link
Collaborator

@cmuench cmuench commented Feb 5, 2023

The Issue

As a user of many different local installed ddev projects I want to filter the ddev list output. Currently we have the only-active flag available.
Additionally we could filter by project type.

How This PR Solves The Issue

The PR restructures the parameters of the list command into a struct. This prepares the command to get additional filters in the future like tags.

Manual Testing Instructions

Run the ddev list command with new filter option -t or --type and set a project type

Example: ddev list -t php or ddev list -t magento2.

The filter can be combined with active only filter.
ddev list -A -t php

Automated Testing Overview

I added a simple test which filters by a not existing type. Currently I am looking for a good way to test also the project type filter by an existing type.

@cmuench cmuench marked this pull request as draft February 5, 2023 16:01
@github-actions
Copy link

github-actions bot commented Feb 5, 2023

@rfay
Copy link
Member

rfay commented Mar 16, 2023

What do you think @cmuench , does this have a future?

@cmuench
Copy link
Collaborator Author

cmuench commented Mar 17, 2023

@rfay The filter is already working. I had a bigger idea but we can start with this approach. That's why it's currently marked as draft.

@cmuench cmuench marked this pull request as ready for review April 6, 2023 15:01
@cmuench cmuench requested a review from a team as a code owner April 6, 2023 15:01
Copy link
Member

@rfay rfay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is looking quite good and is a major code improvement, thanks!

It's missing

cmd/ddev/cmd/list.go Outdated Show resolved Hide resolved
cmd/ddev/cmd/list_test.go Outdated Show resolved Hide resolved
pkg/ddevapp/list.go Show resolved Hide resolved
@rfay rfay changed the title project type filter for list command project type filter for ddev list command (ddev list --type=) Apr 6, 2023
@cmuench cmuench requested a review from a team as a code owner April 7, 2023 17:00
@cmuench
Copy link
Collaborator Author

cmuench commented Apr 7, 2023

This is looking quite good and is a major code improvement, thanks!

It's missing

Done

docs/content/users/usage/commands.md Outdated Show resolved Hide resolved
Proper naming

Co-authored-by: Matt Stein <m@ttste.in>
@cmuench cmuench requested a review from rfay April 8, 2023 16:23
@cmuench
Copy link
Collaborator Author

cmuench commented Apr 13, 2023

This is looking quite good and is a major code improvement, thanks!

It's missing

it's done

@rfay
Copy link
Member

rfay commented Apr 13, 2023

Yay, thanks. Back now and will catch up on PRs eventually :)

@cmuench
Copy link
Collaborator Author

cmuench commented Apr 13, 2023

Yay, thanks. Back now and will catch up on PRs eventually :)

No pressure. I was not sure if I had to inform you.

Copy link
Member

@rfay rfay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@rfay rfay merged commit 52ba935 into ddev:master Apr 14, 2023
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants