Rebuild pull request deploy preview?

I have a pull request based on commit A on the main branch. Netlify gives me a deploy preview. Then another pull request is merged into the main branch, and main is now on commit B. This doesn’t seem to trigger an updated deploy preview for my original pull request, so the preview is out-of-date.

From the Netlify UI I repeated the deploy preview, and that ended up showing me the new result of merging the PR to main. Unfortunately the GitHub pull request still only has the original deploy preview link. So people reviewing the pull request are sent to the old preview.

I am not the author of the pull request, and am the repository maintainer. I’m wondering if this is expected behavior, or if there is some way to properly trigger a rebuild of the PR (that updates the PR status with the latest deploy preview)?

Hey @carolynvs,
Yup, this is expected though I understand not what you were hoping from the feature. You can see more discussion about this, as well as the proposed docs update (and feature request not mentioned there) that came out of that conversation: Docs say Deploy Previews say preview will show result of merge, but it does not - #6 by jen

The TL;DR: for Deploy Previews is that we build the commits you push- there’s no rebasing or post-push updating of the preview based on later changes to the repo.

To get a Deploy Preview with commit B’s changes, you would have to push a new commit to commit A’s PR that includes commit B’s changes. Please let us know if that helps or if there are followup questions!

Also really cool that you’re incentivizing non-code contributions :slight_smile: