bakerkretzmar / laravel-deploy-preview

A GitHub Action to deploy PR preview sites for Laravel apps.
MIT License
19 stars 6 forks source link

Add support for PR `reopened` events #16

Closed GlitchWitch closed 10 months ago

GlitchWitch commented 11 months ago

As discovered in #15, deploy previews are only created when a PR is first opened.

Support for generating previews when a PR is reopened could be added to improve the usability of this action.

This can be potentially be done by changing the following: https://github.com/bakerkretzmar/laravel-deploy-preview/blob/7bbb6ac7683eeed678f12b7e3ca8cc45ff693c3f/src/index.ts#L36

To:

if (pr.action === 'opened' || pr.action === "reopened") {
bakerkretzmar commented 11 months ago

Yeah this makes sense, if the site is destroyed when the PR is closed then opened and reopened can basically be treated the same way.