-
Notifications
You must be signed in to change notification settings - Fork 401
feat(firestore-send-email): migrate to v2 cloud function #2359
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
Conversation
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.
Pull Request Overview
This PR migrates the firestore-send-email extension to use the v2 Cloud Function trigger and supports non-default Firestore databases. The changes include updates to type definitions, modifications in index.ts to adopt Firestore v2 APIs, and corresponding updates in configuration, documentation, and changelog.
Reviewed Changes
Copilot reviewed 7 out of 10 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
functions/src/types.ts | Added new config fields for Firestore instance identification and region. |
functions/src/index.ts | Modified Firestore API usages and trigger setup to support v2 functions and types. |
functions/src/config.ts | Added new configuration properties for database and databaseRegion. |
extension.yaml | Updated function type to firebaseextensions.v1beta.v2function, version bump, and config. |
README.md | Updated documentation to reflect new Firestore instance configuration parameters. |
POSTINSTALL.md | Updated instructions for accessing non-default Firestore databases post-installation. |
CHANGELOG.md | Documented version bump and migration to v2 Firestore trigger. |
Files not reviewed (3)
- project/.firebaserc: Language not supported
- project/.gitignore: Language not supported
- project/firebase.json: Language not supported
a719342
to
b75d88a
Compare
4298229
to
3c2e04f
Compare
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.
Pull Request Overview
This PR migrates the Firestore trigger to use Cloud Functions v2 and adds support for non-default Firestore instances. Key changes include:
- Adding new configuration options (database and databaseRegion) in types and config.
- Updating Cloud Function initialization and trigger setup to use the new Firebase Admin modular API and Firestore v2 trigger.
- Adjusting tests, documentation, and extension parameters to accommodate the new Firestore configuration.
Reviewed Changes
Copilot reviewed 10 out of 11 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
firestore-send-email/functions/src/types.ts | Added new configuration properties for Firestore instance ID and region. |
firestore-send-email/functions/src/index.ts | Migrated to modular Firebase Admin API and updated Firestore trigger and transaction handling. |
firestore-send-email/functions/src/config.ts | Added defaults and environment variable parsing for new firestore configuration fields. |
firestore-send-email/functions/tests/helpers.test.ts | Updated tests to include the new database and region configuration. |
firestore-send-email/functions/tests/config.test.ts | Updated tests to include new firestore configuration keys. |
firestore-send-email/extension.yaml | Increased version; updated trigger configuration and parameters for identifying non-default databases. |
firestore-send-email/README.md | Expanded configuration documentation for Firestore instance ID and location. |
firestore-send-email/POSTINSTALL.md | Updated post-install instructions to reference non-default Firestore databases. |
firestore-send-email/CHANGELOG.md | Updated changelog to reflect the new version and feature additions. |
Files not reviewed (1)
- firestore-send-email/functions/package.json: Language not supported
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.
lgtm
fix: add defaults to config.ts to make tests run
4bd843a
to
4cfffc2
Compare
Resolves #2002
need to test