JakePartusch / wait-for-netlify-action

A GitHub action that will wait until a Netlify Preview deploy has completed before continuing on
MIT License
47 stars 52 forks source link

PR number showing up in generated preview URL as 'undefined' #18

Closed timsutton closed 2 years ago

timsutton commented 2 years ago

First of all, thanks for creating this GitHub action! I was setting up my first workflow to use it, and but then was getting this error when it would try to connect to the preview URL:

Unable to connect to https://deploy-preview-undefined--macops-ca.netlify.app

If I substitute in my actual PR number 14 to get https://deploy-preview-14--macops-ca.netlify.app, I have a valid URL. Is it possible that the context's payload no longer contains number at that level in the structure?

The actual action run for my repo was here.

JakePartusch commented 2 years ago

Hi @timsutton, would you mind re-running to see if this was potentially an intermittent issue? I'm looking at the most recent PR in this repo and I see that the PR # is included:

https://github.com/JakePartusch/wait-for-netlify-action/runs/4158578466?check_suite_focus=true

timsutton commented 2 years ago

Just tried it again and have the same issue, but now I notice something that I had missed earlier:

Screen Shot 2021-11-13 at 7 43 35 PM

..and that was because my workflow yml was using on: [push] instead of on a pull_request event. Makes sense!

timsutton commented 2 years ago

Will move onto the next thing. Thanks for the help!