Skip to content

Add environment deletion and filtered listings#13

Open
hamza-mohd wants to merge 2 commits into
feat/environments-updatefrom
feat/environments-delete-filter
Open

Add environment deletion and filtered listings#13
hamza-mohd wants to merge 2 commits into
feat/environments-updatefrom
feat/environments-delete-filter

Conversation

@hamza-mohd

Copy link
Copy Markdown
Member

Summary

  • add authenticated DELETE /api/environments/{id} support
  • align environment listings with the search and pagination behavior used elsewhere
  • cover filtered listing and deletion in tests and docs

Notes

  • This is PR 7 of an 8-PR stacked series.
  • Base branch: feat/environments-update.

Copilot AI review requested due to automatic review settings June 12, 2026 14:35

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR extends the environments API surface by adding authenticated deletion and updating environment collection listings to support the same search + pagination query behavior used by other collection endpoints (credentials/connections), with accompanying doc and test coverage.

Changes:

  • Add DELETE /api/environments/{id} route and handler support.
  • Update GET /api/environments to support page, pageSize/pagesize, and search/q, returning paginated results plus total counts.
  • Add test coverage for filtered listing and deletion; update README to document the new delete endpoint and listing behavior.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
README.md Documents the new environment delete endpoint and notes search/pagination support on the environments collection.
internal/provider/server.go Registers the DELETE route for environment resources.
internal/provider/server_test.go Adds an integration-style test covering filtered listing and deletion of environments.
internal/provider/environments.go Implements search + pagination for environment listings and adds delete support.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +592 to +596
if err := json.Unmarshal(rec.Body.Bytes(), &created); err != nil {
t.Fatalf("failed to decode environment create response: %v", err)
}

environmentID := created["id"].(string)

@winkletinkle winkletinkle left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I must be miss remembering. I swear that we decided against this.

@winkletinkle winkletinkle self-assigned this Jun 12, 2026
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.

3 participants