Add environment deletion and filtered listings#13
Open
hamza-mohd wants to merge 2 commits into
Open
Conversation
There was a problem hiding this comment.
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/environmentsto supportpage,pageSize/pagesize, andsearch/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
left a comment
Member
There was a problem hiding this comment.
I must be miss remembering. I swear that we decided against this.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
DELETE /api/environments/{id}supportNotes
feat/environments-update.