Register the Forgejo webhook for Period on the Command Center #9
Labels
No Label
P0
P1
P2
release-blocker
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: null/Privacy-Period-Tracker#9
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The repository is mapped to the Command Center, so its issue and milestone counts arrive on the periodic reconcile. The webhook is a separate step and it is silent when missing.
Without it:
P0raises no alert at all — it becomes news at the next sweep rather than at the moment it is filedThat second one is the reason this is an issue rather than a footnote. The failure is invisible: everything looks like it is working, just slowly, and nobody notices that the alerting half was never switched on.
What is needed, and why it is filed rather than done: the webhook URL and its secret are held by the Command Center and are not in any credential file on this machine that an agent can read. Registering it is
POST /repos/null/Privacy-Period-Tracker/hooksonce those two values are in hand, or the repository's Settings → Webhooks page.Do not treat mapping the repository as having done this. They are different operations and only one of them is visible from the project screen.
Verify:
curl -H "$H" "$BASE/repos/null/Privacy-Period-Tracker/hooks"lists a hook, its most recent delivery shows a 2xx response, and opening a test issue labelledP0produces an alert rather than waiting for the next reconcile.Registered. Hook id 3 on
null/Privacy-Period-Tracker.Config is byte-for-byte the payload the site's own
src/lib/forgejo-write.tssends (
references/api.md:172-186of theprivacyllc-webhook-listenerskill).The secret came from
FORGEJO_WEBHOOK_SECRETin the credentials file; it is notrecorded here or anywhere in this repo.
Evidence it works
A signed replay against the live endpoint — troubleshooting step 8 — returned:
That single response proves four things at once: the endpoint is live (not the
503
not_configuredit returns with no secret set), the HMAC matches (it returns401 on a bad signature and never accepts unsigned deliveries), the repo is
mapped to a project —
"project":"Privacy: Period Tracker"— so trackerrefreshes are not silently dropped for a null
projectId, and the event applied.The probe used
refs/heads/webhook-registration-checkwith zero commits onpurpose: only non-empty default-branch pushes stamp
last_verified_at, sothis could not falsely mark the project as verified.
What it now does
issuesopened withP0→ immediate alert on every carried transport,instead of the P0 sitting unannounced until the next sweep. This was the whole
reason for the issue.
issuesany action → tracker report refreshed within seconds.main→ stampsprojects.last_verified_at, so the verified dateon the project screen is real rather than stale.
Payloads are SHA-256 hashed and discarded — only counts, identifiers and the
action reach the activity log, never issue titles or commit messages. That
matters for this repo in particular.
One deviation from the documented event set, deliberate
The skill says the site registers
push,issues,milestone. This Forgejohas no standalone
milestonerepo-hook event — it accepts the POST, drops thename, and expands
issuesinto its sub-events. Confirmed twice: on create, andon a
PATCHexplicitly re-sendingmilestone, which returned the same list.null/PrivacyLLC-Web's hook (id 1, 17 events) has nomilestoneeither, so thesite's own registration path hits this too.
Practical effect is small:
issue_milestonestill fires when an issue moves inor out of a batch, and every
issuesevent refreshes the tracker regardless. Theonly uncovered case is opening or closing a milestone with no issue activity
attached, which the daily reconcile still catches.