Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Comment on lines
+84
to
+101
| name: Backup database to S3 | ||
| runs-on: ubuntu-latest | ||
| if: github.ref == 'refs/heads/master' && github.event_name == 'push' | ||
| steps: | ||
| - name: Dump database | ||
| env: | ||
| SUPABASE_DB_URL: ${{ secrets.SUPABASE_DB_URL }} | ||
| PGSSLMODE: require | ||
| run: pg_dump "$SUPABASE_DB_URL" -Fc -f backup.dump | ||
|
|
||
| - name: Upload to S3 | ||
| env: | ||
| AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
| AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
| AWS_REGION: ${{ secrets.AWS_REGION }} | ||
| S3_BUCKET: ${{ secrets.S3_BUCKET }} | ||
| run: | | ||
| aws s3 cp backup.dump "s3://$S3_BUCKET/backups/$(date +%Y-%m-%d_%H-%M-%S).dump" |
There was a problem hiding this comment.
Pull request overview
This PR refactors membership-related cron behavior by removing the standalone membership renewal reminder cron/route, moving reminder sending into the membership cycling cron, and adding a new cron endpoint to periodically ping the database to prevent Supabase pausing. It also adds a database backup job to CI and includes a performance report document.
Changes:
- Remove
/api/cron/membership-renewal-reminderand update the renewal email template to support a dynamic membership end date. - Add
/api/cron/prevent-supabase-pausingand schedule it invercel.json. - Add a CI job to dump the Supabase database and upload the dump to S3.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| vercel.json | Removes the membership reminder cron schedule and adds a new keep-alive cron schedule. |
| src/components/email-template.tsx | Updates the membership renewal reminder email to accept dynamic props (name/date/link). |
| src/app/api/cron/prevent-supabase-pausing/route.ts | Adds a cron-protected DB “health” endpoint to prevent Supabase pausing. |
| src/app/api/cron/membership-renewal-reminder/route.ts | Removes the old reminder-sending cron endpoint. |
| src/app/api/cron/cycle-memberships/route.ts | Updates membership-cycling cron to also send reminder emails via Resend. |
| codersforcauses-performance-report.md | Adds a performance report document. |
| .github/workflows/ci.yml | Adds a database backup-to-S3 job on pushes to master. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Change Summary
[Briefly summarise the changes that you made. Just high-level stuff]
Change Form
Fill this up (NA if not available). If a certain criteria is not met, can you please give a reason.
Other Information
[Is there anything in particular in the review that I should be aware of?]