Skip to content

Commit a28defb

Browse files
author
Izaak Gough
committed
docs: add comment to improve readability
1 parent af48d76 commit a28defb

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/gcp/cloudfunctionsv2.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -469,6 +469,10 @@ export function functionFromEndpoint(endpoint: backend.Endpoint): InputCloudFunc
469469
"timeoutSeconds",
470470
);
471471

472+
// endpoint.serviceAccount is one user-facing option, but the v2 API splits it
473+
// across buildConfig.serviceAccount (resource name) and serviceConfig.serviceAccountEmail
474+
// (email only). convertIfPresent handles one destination field at a time, which
475+
// would duplicate the presence check, null handling, and email formatting.
472476
if (Object.prototype.hasOwnProperty.call(endpoint, "serviceAccount")) {
473477
const serviceAccount = endpoint.serviceAccount;
474478
if (!serviceAccount) {

0 commit comments

Comments
 (0)