feat: Add Ephemeral Environment methods to environment repository#233
Merged
stevencl840 merged 1 commit intomainfrom Oct 9, 2025
Merged
feat: Add Ephemeral Environment methods to environment repository#233stevencl840 merged 1 commit intomainfrom
stevencl840 merged 1 commit intomainfrom
Conversation
geofflamrock
reviewed
Oct 9, 2025
Contributor
geofflamrock
left a comment
There was a problem hiding this comment.
Generally looks good, a few small questions and thoughts that I think we'll prob want to look at before we can look to merge this in.
| return response; | ||
| } | ||
|
|
||
| async deprovisionEphemeralEnvironmentProject(projectId: string, environmentId: string): Promise<DeprovisionEphemeralEnvironmentProjectResponse> { |
Contributor
There was a problem hiding this comment.
We will also need the ability to deprovision the entire ephemeral environment, are you planning to add in this PR?
Contributor
Author
There was a problem hiding this comment.
Yes, I overlooked the use case.
geofflamrock
approved these changes
Oct 9, 2025
Contributor
geofflamrock
left a comment
There was a problem hiding this comment.
Further changes look good 👍 just one thought on the order of parameters in the create function. Doesn't need a re-review unless you would like one.
c2102a4 to
bf431f8
Compare
bf431f8 to
3b7f546
Compare
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.
Context 🌇
Ephemeral environments are temporary environments that developers can use to test changes. They are expected to come and go with the same cadence as a PR, created when the PR is opened and torn down when it is merged.
Users would like to be able to manually deploy their release to their ephemeral environment rather than having it deployed automatically when the release is created.
Details 🔍
Users want to be able to deploy to an ephemeral environment from their GitHub Action workflow. This means they will need to be able to create the ephemeral environment from the same workflow. When the PR has been closed, users would like to deprovision their project from the ephemeral environment.
In order to add new GitHub Actions to facilitate this, we need to update the Typescript API client so we can call the required endpoints. As such, I have added new methods to
environmentRepositoryto call thecreateEphemeralEnvironmentanddeprovisionedEphemeralEnvironmentForProjectendpoints. I have also added agetEnvironmentByNamemethod, which is compatible with ephemeral environments and will allow us to resolve the ID of an environment from its name. This will be necessary for the deprovisioning action.Testing 🧪
I have added examples that cover the new methods, which I have used to test that the repository methods work as expected.
Files?? 📁
I moved the utility.ts file from the runbook examples so it is available for all examples. It is not a functionality change, but it did change all the runbook examples. It is worth it.