Fix Cloudflare Pages crash without latest deployment - #29007
raycastbot merged 2 commits into
Conversation
|
Thank you for your contribution! 🎉 🔔 @Destiner @niklaswa @teziovsky @xmok @TakenMC @nbbaier @maximilianzuern you might want to have a look. You can use this guide to learn how to check out the Pull Request locally in order to test it. 📋 Quick checkout commandsBRANCH="fix/cloudflare-pages-null-latest-stage"
FORK_URL="https://github.com/mralonsocorona/extensions.git"
EXTENSION_NAME="cloudflare"
REPO_NAME="extensions"
git clone -n --depth=1 --filter=tree:0 -b $BRANCH $FORK_URL
cd $REPO_NAME
git sparse-checkout set --no-cone "extensions/$EXTENSION_NAME"
git checkout
cd "extensions/$EXTENSION_NAME"
npm install && npm run devWe're currently experiencing a high volume of incoming requests. As a result, the initial review may take up to 15 business days. |
Greptile SummaryThis PR fixes a crash in the Cloudflare "View Pages" command that occurred when a Pages project had no latest deployment (
Confidence Score: 4/5The code fix is correct and handles the null API response safely; only the changelog date format needs to be corrected before merging. The null-safety changes in service.ts and utils.ts are well-implemented and correctly address the crash. The changelog entry uses a hardcoded date rather than the required template variable — the PR description itself notes the intent to use the placeholder, so this appears to be an oversight. extensions/cloudflare/CHANGELOG.md — the date placeholder needs to be {PR_MERGE_DATE} instead of the hardcoded date. Important Files Changed
Prompt To Fix All With AIFix the following 1 code review issue. Work through them one at a time, proposing concise fixes.
---
### Issue 1 of 1
extensions/cloudflare/CHANGELOG.md:3
The changelog entry uses a hardcoded date (`2026-06-25`) instead of the `{PR_MERGE_DATE}` template variable. Per the Raycast changelog convention, new entries must always use `{PR_MERGE_DATE}` so the merge date is automatically populated on release — the PR description even notes this intent.
```suggestion
## [Fix] - {PR_MERGE_DATE}
```
Reviews (2): Last reviewed commit: "Update CHANGELOG.md" | Re-trigger Greptile |
pernielsentikaer
left a comment
There was a problem hiding this comment.
Looks good to me, approved 🔥
|
Published to the Raycast Store: |
|
🎉 🎉 🎉 Such a great contribution deserves a reward, but unfortunately we couldn't find your Raycast account based on your GitHub username (@mralonsocorona). Please link your GitHub account to your Raycast account to receive your credits and soon be able to exchange them for some swag. |
| @@ -1,5 +1,9 @@ | |||
| # Cloudflare Changelog | |||
|
|
|||
| ## [Fix] - 2026-06-25 | |||
There was a problem hiding this comment.
The changelog entry uses a hardcoded date (
2026-06-25) instead of the {PR_MERGE_DATE} template variable. Per the Raycast changelog convention, new entries must always use {PR_MERGE_DATE} so the merge date is automatically populated on release — the PR description even notes this intent.
| ## [Fix] - 2026-06-25 | |
| ## [Fix] - {PR_MERGE_DATE} |
Rule Used: What: Changelog entries must use {PR_MERGE_DATE}... (source)
Prompt To Fix With AI
This is a comment left during a code review.
Path: extensions/cloudflare/CHANGELOG.md
Line: 3
Comment:
The changelog entry uses a hardcoded date (`2026-06-25`) instead of the `{PR_MERGE_DATE}` template variable. Per the Raycast changelog convention, new entries must always use `{PR_MERGE_DATE}` so the merge date is automatically populated on release — the PR description even notes this intent.
```suggestion
## [Fix] - {PR_MERGE_DATE}
```
**Rule Used:** What: Changelog entries must use `{PR_MERGE_DATE}`... ([source](https://app.greptile.com/raycast/-/custom-context?memory=c2214c11-df56-490a-b1c0-09a385df481a))
How can I resolve this? If you propose a fix, please make it concise.Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
* fix(cloudflare): handle pages without deployments * Update CHANGELOG.md --------- Co-authored-by: raycastbot <bot@raycast.com>
Summary
Fixes a crash in the Cloudflare View Pages command when a Pages project has no latest deployment.
The Cloudflare API can return
latest_deploymentasnull, but the extension previously accessedlatest_deployment.latest_stage.statusdirectly.Changes
unknowndeployment status for Pages/deployments without status data.{PR_MERGE_DATE}.Validation
npm run lintnpm run buildFixes #28848