diff --git a/spec/providers/https.spec.ts b/spec/providers/https.spec.ts index 3d80f60ef..6e3a89032 100644 --- a/spec/providers/https.spec.ts +++ b/spec/providers/https.spec.ts @@ -234,7 +234,10 @@ describe('callable.FunctionBuilder', () => { const result = https.onCall((data) => { return 'response'; }); - expect(result.__trigger).to.deep.equal({httpsTrigger: {}}); + expect(result.__trigger).to.deep.equal({ + httpsTrigger: {}, + labels: { 'deployment-callable': 'true' }, + }); }); it('should handle success', () => { diff --git a/src/cloud-functions.ts b/src/cloud-functions.ts index 8db2f15ea..3717f8ca1 100644 --- a/src/cloud-functions.ts +++ b/src/cloud-functions.ts @@ -159,7 +159,8 @@ export interface TriggerAnnotated { eventType: string; resource: string; service: string; - } + }, + labels?: { [key: string]: string } }; } diff --git a/src/providers/https.ts b/src/providers/https.ts index 6ea209dab..82f5c56ba 100644 --- a/src/providers/https.ts +++ b/src/providers/https.ts @@ -435,7 +435,10 @@ export function onCall( return corsHandler(req, res, () => func(req, res)); }; - corsFunc.__trigger = {httpsTrigger: {}}; + corsFunc.__trigger = { + httpsTrigger: {}, + labels: { 'deployment-callable': 'true' }, + }; return corsFunc; }