heroku-review-app-actions icon indicating copy to clipboard operation
heroku-review-app-actions copied to clipboard

Run create build step on opened _or_ sync actions

Open rawestmoreland opened this issue 2 years ago • 5 comments

Run the create build step on opened or synchronize

rawestmoreland avatar Jun 17 '22 18:06 rawestmoreland

Related to issue https://github.com/pmbanugo/heroku-review-app-actions/issues/21

rawestmoreland avatar Jun 17 '22 18:06 rawestmoreland

The new change is basically the same as the old one. They both create a new build. What I meant was that the create app endpoint returns data that can be used in a different step to curl the build output without creating a new build like you currently have.

pmbanugo avatar Jun 18 '22 11:06 pmbanugo

@pmbanugo So it looks like we may need to request the list of builds and then use the output stream URL of index 0 since that's the build most recently started from the create step.

Although not sure if it's safe to assume index 0 will always be the build from the Create app step

rawestmoreland avatar Jun 18 '22 13:06 rawestmoreland

In this case, 0 will be the correct value because it should be the only build for the app.

pmbanugo avatar Jun 18 '22 17:06 pmbanugo

In this case, 0 will be the correct value because it should be the only build for the app.

Sounds good. The other issue I'm seeing is we need to wait for an app status of created. Not sure if a simple sleep will suffice or if we want to poll the endpoint for the app id.

rawestmoreland avatar Jun 18 '22 17:06 rawestmoreland