0

I'd like to get an email upon every firebase deploy.

Reason: security - I want to know if someone hacks into my account and deploys an alternative firebase backend.

Is it possible?

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807
Slavik N
  • 4,705
  • 17
  • 23

2 Answers2

0

This feature doesn't exist. You could file a feature request.

Doug Stevenson
  • 297,357
  • 32
  • 422
  • 441
0

You can ahceive what you are after using Firebase Cloud Functions. Here an article, Email via Firebase Firestore Cloud Function Triggers showing the exact script to email on one of these events that you can use/adapt to your specific needs/project.

For Firestore:

Trigger a Cloud Firestore function

The Cloud Functions for Firebase SDK exports a functions.firestore object that allows you to create handlers tied to specific events.

Cloud Firestore supports create, update, delete, and write events:

Event Type Trigger

.onCreate Triggered when a document is written to for the first time.

.onUpdate Triggered when a document already exists and has any value changed.
.onDelete Triggered when a document with data is deleted.

.onWrite Triggered when .onCreate, .onUpdate or .onDelete is triggered.

Ronnie Royston
  • 16,778
  • 6
  • 77
  • 91
  • What trigger should I use to get emails for "firebase deploy"? – Slavik N Jul 16 '18 at 07:53
  • "firebase deploy" does several things - it deploys functions, hosting, database rules, etc. If your requirement is to watch events on your database, that can be achieved. – Ronnie Royston Jul 16 '18 at 14:37
  • My requirement is to watch 'firebase deploy' itself, so that I know if someone tempers my backend functions (or even deletes them all). – Slavik N Jul 16 '18 at 22:23