aws-amplify / amplify-hosting

AWS Amplify Hosting provides a Git-based workflow for deploying and hosting fullstack serverless web applications.
https://aws.amazon.com/amplify/hosting/
Apache License 2.0
461 stars 116 forks source link

Programatically create PR preview #3963

Open taraspos opened 3 weeks ago

taraspos commented 3 weeks ago

Before opening, please confirm:

Amplify Hosting feature

Deployments, Frontend builds, Public APIs, Web previews

Is your feature request related to a problem? Please describe:

Due to lack of AWS Amplify functionality we can't effectively use PR Preview feature:

As result, we want to create PR previews using AWS CLI, but after testing we found that aws amplify create-branch call can't replicate behaviour of automatically created PR previews.

Even though it's possible to set --stage PULL_REQUEST resulting branch missing destinationBranch and sourceBranch properties and as result it's not being treated as PR branch by Amplify Hosting. It seems like those properties are not available in Public APIs.

Describe how you'd like this feature to work

AWS Amplify allows me to create PR preview branch via CLI, something like:

aws amplify create-branch --pr-id 3333 --enable-automatic-build

Which in turn will replicate behaviour of automatically generated PR preview, namely:

  1. Create PR preview branch
  2. Add status check to PR in git provider
  3. Publish PR preview URL in PR comments
github-actions[bot] commented 3 weeks ago

This has been identified as a feature request. If this feature is important to you, we strongly encourage you to give a 👍 reaction on the request. This helps us prioritize new features most important to you. Thank you!

taraspos commented 2 weeks ago