Deploy webhook and development lifecycle
Report deploys from any tool with a signed request, and see branches, commits, pull requests, deploys and releases on each task.
This feature is in beta. If you do not see it, ask your admin to turn it on for your organization.
This page covers two related pieces. The deploy webhook lets any tool tell ProjectBrain about a deploy with a signed request. The development lifecycle puts the branches, commits, pull requests and deploys behind a task on the task itself, so you can see how far it has gone, from first branch to release.
Before you start
Section titled “Before you start”There are two switches, and an admin turns each on for your organization:
- Deploy webhook turns on the signed deploy endpoint, its settings page, deploy and release information on tasks, and release milestones. It works without GitHub or GitLab. Teams that deploy with Vercel, Forge, ServerAvatar or a script can use it alone.
- Development tracking turns on branches, commits and the GitHub or GitLab deploy path. It also needs GitHub or GitLab connected. Turning it on also opens the deploy webhook, so existing users keep working.
Report deploys with the webhook
Section titled “Report deploys with the webhook”- Go to Organization settings > Integrations > Deploys.
- Choose Create webhook. You get an Endpoint URL and a Signing secret. Copy the secret now. It is shown only once.
- Optionally pick a Project. Deploys from the webhook then count as deploys of that project, so an error that starts right after one reads “Started right after deploy” even when no task came with it. See Error tracking.
- In your pipeline, send a signed request each time something deploys.
What to send
Section titled “What to send”Send a POST with a JSON body and these headers:
X-ProjectBrain-Timestamp: the time in Unix seconds. Requests more than 5 minutes off are refused.X-ProjectBrain-Signature:sha256=followed by the hex HMAC-SHA256 of the timestamp, a dot and the exact body, using your signing secret.
The body fields are:
| Field | Meaning |
|---|---|
environment |
Required. The environment, such as staging or production. A new name creates an environment. |
status |
Required. success, failure, in_progress or pending. |
sha |
The deployed commit. Send this, task_keys, or both. |
task_keys |
A list of task keys the deploy carried. |
version |
Optional. A release version such as v2.4.0. It attaches the deploy to a tracked release. |
url |
Optional. A link to the deploy, https only. |
deployed_at |
Optional. A success without it is stamped now. |
external_id |
Optional. Makes a repeated call safe. |
Sign the exact bytes you send. An example request is shown on the settings page. A request with a bad signature, an old timestamp or a repeated envelope is refused. A webhook that does not exist, or one for an organization that has the feature off, answers “not found”.
Manage the webhook
Section titled “Manage the webhook”- Recent deliveries lists the last 20 requests with the result, such as accepted or refused. Request bodies are not stored.
- Rotate secret gives a new secret, shown once. The old one keeps working for 7 more days, so you can update your pipeline without missing a deploy.
- Environments lists the environments deploys created. You can rename one, reorder it and mark it as production. Renaming changes what is shown. Deploys keep matching on the original name. A deploy to production, live or prod is marked production on first sight.
Deploys from GitHub
Section titled “Deploys from GitHub”If GitHub is connected and development tracking is on, GitHub deployments and their statuses become deploys without any webhook. GitHub must send deployment events to ProjectBrain. See GitHub. GitLab deployment events work the same way.
How a deploy is linked to tasks
Section titled “How a deploy is linked to tasks”A successful deploy is linked to the tasks it carried:
- A task whose key is on a commit that was deployed.
- A task with a merged pull request whose merge commit is in the deployed code. ProjectBrain asks GitHub, looks back 90 days and checks at most 25 merges per deploy.
- Tasks named in
task_keysfrom the webhook.
A task with no link to a successful deploy reads Not seen in a deploy yet. It never reads “Not deployed”, because a squash merge done elsewhere or a skipped check can leave no link even when the code is live.
The Development panel on a task
Section titled “The Development panel on a task”Open a task and look for its Development panel. Sections appear only when they have something, in this order:
- Branches: branches whose name contains the task key. Copy branch name on the task gives you a name to use.
- Commits: commits whose message names the task. A long list shows the first few. Show all reveals the rest.
- Pull requests: linked pull requests or merge requests, with live status.
- Deploys: each successful deploy and its environment.
- Release: the release the task shipped in.
A branch or commit counts when it names the task key, and the repository is mapped to the task’s project. A mapping that is paused, or a removed repository, records nothing. An AI assistant connected to ProjectBrain can read the same information. It sees exactly what you would.
Releases
Section titled “Releases”A milestone can be marked as a release, with a version number. Open it in the project’s Timeline tab and look for its release settings. They appear only when the deploy webhook is on and you can edit the project.
- Mark released records that it shipped. A second press changes nothing, and the first date is kept.
- Mark released when every task reaches production is an opt-in. When a successful production deploy carries every task of the milestone, except canceled ones, ProjectBrain marks it released on its own. A milestone with no tasks, or with a task not yet deployed, is never auto-released.
For releases with versions, checks, sign-offs and several environments, use the Release tracker.
Limits
Section titled “Limits”- ProjectBrain records deploys. It does not run or roll back a deploy.
- A deploy event for a repository that is not mapped to a project is not stored.
- Deploy webhook secrets are shown once. If you lose one, rotate it.
- Automatic release needs the deploy to name or carry the tasks. Coverage depends on what your pipeline sends.
- This feature is in beta, and screens and wording may change.
Related pages
Section titled “Related pages”- GitHub
- GitLab
- Release tracker
- Webhooks: for requests that ProjectBrain sends to your server.