Reference
willo_delete_file
Delete one file from the site code on GitHub.
- Act
- Needs approval
- Metered
On this page
Delete a site file. ALWAYS needs a person's approval, as in Willo's chat (pending_approval + link; call again with the same arguments after). Lands on draft while drafting, else on main and LIVE. A text file up to 100 KB can be restored from the dashboard; a binary or larger one cannot. Refused for files the site cannot build without (package.json, package-lock.json, the base layout) and the paths willo_write_file refuses. For a CMS entry use willo_content_publish with action delete.
Access
- Token: read + act, and editor access or higher on the business.
- Approval: Always. Every call raises a card a person approves on the dashboard.
- Metered: counts toward a per-business, per-minute limit for this kind of call. See Limits.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
path | string | yes | Repo-relative path of one file (never a directory). |
sha | string | no | Optional: the sha from willo_read_file; refused if the file has changed since. |
summary | string | no | One plain sentence for the owner, shown on the card. |