Functions

Update the linked repository

Changed on

Change the branch, the root directory, or whether pushes deploy. Pass at least one field. rootDir: null clears the subdirectory.

patch/v1/functions/{functionId}/git-link

Request

  • Base URL
    https://api.zavu.dev
  • URL
    https://api.zavu.dev/v1/functions/{functionId}/git-link
  • Auth
    HTTP bearer

Path parameters

functionIdstring required

Zavu Function ID.

Request body

branchstring
rootDirstring nullable
autoDeployboolean

Response

The link.

webhookUrlstring uri required

Endpoint that receives GitHub's push deliveries. Only needed on a manual link, where you add it to the repository yourself.

webhookSecretstring

Shared secret for the repository's webhook. Returned only when creating a manual link, and only there — every later read strips it, and re-linking mints a new one. Absent entirely on an app link, which needs no secret of its own.

Example response

{
  "link": {
    "owner": "acme",
    "repo": "order-bot",
    "branch": "main"
  },
  "webhookSecret": "ghs_a1b2c3..."
}

Changes