We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f16b004 commit 2fbf1a3Copy full SHA for 2fbf1a3
index.js
@@ -19,8 +19,16 @@ const waitForUrl = async (url, MAX_TIMEOUT) => {
19
const run = async () => {
20
try {
21
const PR_NUMBER = github.context.payload.number;
22
+ if (!PR_NUMBER) {
23
+ core.setFailed(
24
+ "Action must be run in conjunction with the `pull_request` event"
25
+ );
26
+ }
27
const MAX_TIMEOUT = Number(core.getInput("site_name")) || 60;
28
const siteName = core.getInput("site_name");
29
+ if (!siteName) {
30
+ core.setFailed("Required field `site_name` was not provided");
31
32
const url = `https://deploy-preview-${PR_NUMBER}--${siteName}.netlify.com`;
33
console.log(`Waiting for a 200 from: ${url}`);
34
await waitForUrl(url, MAX_TIMEOUT);
0 commit comments