Skip to content

Conversation

@devin-ai-integration
Copy link

Add --active-last-2-months filter to environments command

Summary

Adds a new --active-last-2-months boolean filter flag to the shipyard get environments command that allows users to filter environments that have been active in the last 2 months, regardless of their current running status.

The implementation follows the exact same pattern as the existing --deleted flag:

  • Flag definition with appropriate help text
  • Viper binding in PreRun section
  • Parameter processing that sends active_last_2_months=true as a query parameter to the API

Review & Testing Checklist for Human

  • Verify backend API support: Confirm that the Shipyard API actually accepts and properly handles the active_last_2_months query parameter
  • Test the flag functionality: Run shipyard get environments --active-last-2-months with real API credentials to ensure it works end-to-end
  • Validate parameter naming: Double-check that the snake_case active_last_2_months API parameter name matches backend expectations

Notes

  • The CLI builds successfully and shows the flag in help output
  • All existing tests pass
  • Implementation mirrors the --deleted flag pattern exactly
  • No integration testing was possible without API credentials

Link to Devin run: https://app.devin.ai/sessions/4c531f3996bf46cbad874f8cab622413
Requested by: @bueller

- Add flag definition in NewGetAllEnvironmentsCmd()
- Add viper binding in PreRun section
- Add parameter processing in handleGetAllEnvironments()
- Follows same pattern as existing --deleted flag
- API parameter name: active_last_2_months

Co-Authored-By: Benjie D <bueller@gmail.com>
@devin-ai-integration
Copy link
Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@bueller
Copy link
Contributor

bueller commented Sep 19, 2025

this was a test pr trying out devin closing

@bueller bueller closed this Sep 19, 2025
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.

2 participants