-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Whitelist vercel deploy script #7
Conversation
When the nextjs deploy script is edited we deploy preview to Vercel. In order to deploy previews we need Strapi to be running for the branch on govinor, so we'll add this file to the whitelist.
These webhook responses are visible in GitHub's UI and help with debugging, so let's add some detail on why no action was taken.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CR 🌵
@masonmcelvain |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I spotted a Typescript issue. Let me know if you want me to complete this pull and ship it (we're still deploying manually here).
As a side note, remember we also have the ability to boot any branch whenever our automatic rules don't cover a specific scenario where we'd like to have a Govinor instance:
https://govinor.com/repositories/a2a4ff62-d9f1-4066-a2e9-5ed9a36f751d/branches/new
return json({ | ||
message: `No action taken for webhook payload action ${webhook.payload.action}`, | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This causes a typescript error:
The reason for this being that the default case should never be reached because of this validation:
govinor/app/routes/github.webhook/route.tsx
Lines 55 to 58 in db583a2
const validation = GithubEventSchema.safeParse({ event, payload }); | |
if (!validation.success) { | |
throw json({ message: "skipped", validation: validation.error }, 200); | |
} |
Admittedly the fact that I'm returning a json
response is confusing here, this should just be something like:
return json({ | |
message: `No action taken for webhook payload action ${webhook.payload.action}`, | |
}); | |
return assertNever(webhook.payload); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dhmacs, @masonmcelvain is out this week. If you have time to tackle this, feel free, but it's not high priority. |
dev_block 👍🏻 |
I am not interested in merging this since we have a way to boot any branch. It would be nice if that link to boot a branch was available somewhere in the Strapi UI, I was not aware that feature was available. |
@masonmcelvain it's in the repo page: https://govinor.com/repositories/a2a4ff62-d9f1-4066-a2e9-5ed9a36f751d I can make it more visible, since maybe it's not obvious that it's a link |
Ah I see thanks! I didn't notice that button, I thought it was text 😓 |
The ifixit-nextjs-dev PR deploy failed a few times in https://github.com/iFixit/ifixit/pull/55534, and it turns out we don't deploy strapi when there are changes to the vercel deploy script. This change deploys strapi in that case, and also clarifies the webhook response message to make debugging a little easier.
CC @jarstelfox