Repository navigation
Description
Problem
The Service takes a repository's webhook events and runs the scoped update at once. Without the webhook, the repository gets only the poll (a delay of up to one poll interval). k8s/README.md (step 8 of the Service setup) tells a person to add the webhook by hand, and devops roadmap onboard (#1359) has no row for it. A repository can be onboarded and still have no webhook, or a webhook with the wrong URL, content type or events, and nobody sees it.
Expected
devops roadmap onboard has a row for the webhook. It reads the hooks of the repository and reports present, missing or wrong with the reason. It writes nothing: a webhook carries a secret, and a webhook is a repository setting, so only a person adds it.
Acceptance criteria
- A row
webhookreadsGET repos/<owner>/<name>/hooks. It ispresentwhen one active hook has the URL of the Service router, the content typeapplication/json, and the events inCONST_ROADMAP_WEBHOOK_EVENTS. - A hook with another URL, content type or event set reads
wrong, and the row names the field. - The installation token of the App has no administration permission, so it cannot list hooks. The row then reads
not readable as <login>and prints the step. It does not fail. - When the row is
missingorwrong, the command prints the exact step for a person: the URL, the content type, the events, anddevops config set service.webhook_secretsfor the secret. It never prints a secret and never creates a hook. - The step text in
k8s/README.md(step 8) and the row use the same list of events. A test fails if they differ. -
docs/roadmap/onboard.mddescribes the row.
Existing tool considered
The GitHub REST API lists hooks. No other tool is needed. The cost is about 120,000 tokens and 1 hour.
Related
#1359 (the command), #3742. ADR 0017 (each subscribed webhook event runs the update scoped to it).
Proposed design
Problem statement
The Service receives a repository's webhook events and runs the scoped update at once. Without the webhook, the repository waits for the poll. Onboarding has no row for the webhook. A repository can have no webhook or a wrong webhook, and nobody sees it. The change adds a read-only webhook row to devops roadmap onboard.
Acceptance criteria
Requirement: Webhook row reads hooks
devops roadmap onboard SHALL show a webhook row that reads GET repos/<owner>/<name>/hooks.
Scenario: The row reads hooks
- WHEN the command runs for a repository whose installation token can read hooks
- THEN the row sends one GET request to
repos/<owner>/<name>/hooksand prints a status.
Requirement: A matching hook is present
The row SHALL report present when one active hook has the Service router URL, the JSON content type, and the event set in CONST_ROADMAP_WEBHOOK_EVENTS.
Scenario: One active hook matches
- WHEN the hooks response holds one active hook with the configured URL,
config.content_typejson, and events equal toCONST_ROADMAP_WEBHOOK_EVENTS - THEN the row prints
presentand names no field as wrong.
Requirement: No hooks is missing
The row SHALL report missing when the hooks list is empty.
Scenario: The repository has no hooks
- WHEN the hooks response holds an empty list
- THEN the row prints
missingand prints the setup step.
Requirement: A non-matching hook is wrong
The row SHALL report wrong and name the field when no active hook matches and the hooks list is not empty.
Scenario: One hook has wrong fields
- WHEN the hooks response holds one hook with a different URL, content type, and event set
- THEN the row prints
wrongand namesurl,content_type, andevents.
Requirement: An inactive Service hook is wrong
The row SHALL report wrong and name active when the only hook with the Service router URL is inactive.
Scenario: The Service hook is inactive
- WHEN the hooks response holds one inactive hook with the configured URL, JSON content type, and required events
- THEN the row prints
wrongand namesactive.
Requirement: An unreadable hooks list does not fail
The row SHALL report not readable as <login> and print the setup step when GitHub refuses the hooks read.
Scenario: The token cannot read hooks
- WHEN the hooks request returns HTTP 403 or 404
- THEN the row prints
not readable as devops-cli-serviceand the setup step, and the command exits 0.
Requirement: The setup step is exact and secret-safe
The row SHALL print the URL, the JSON content type, the events, and the service.webhook_secrets config command when it is missing or wrong.
Scenario: The row prints the step
- WHEN the row is
missingorwrongand the configuration holds a webhook secret - THEN the output holds the URL,
application/json, each event, anddevops config set service.webhook_secrets, and holds no secret value.
Requirement: The row writes nothing
The webhook row MUST make no write request to GitHub and MUST create no hook.
Scenario: The row reads hooks
- WHEN the command runs with a fake GitHub client
- THEN the client records only GET requests and no POST, PATCH, or DELETE request.
Requirement: The README and the row share one event list
The step text in k8s/README.md step 8 and the row SHALL use the same event list from CONST_ROADMAP_WEBHOOK_EVENTS.
Scenario: The README event list differs
- WHEN the event list in step 8 differs from
CONST_ROADMAP_WEBHOOK_EVENTS - THEN a test fails and names both lists.
Requirement: Onboard documentation describes the webhook row
docs/roadmap/onboard.md SHALL describe the webhook row and its results.
Scenario: The documentation lists the row
- WHEN the documentation test reads
docs/roadmap/onboard.md - THEN the file names
webhook,present,missing,wrong, andnot readable.
Existing Tool Considered
No alternatives check has run. The GitHub REST API GET repos/<owner>/<name>/hooks covers the read of repository hooks. It lacks the devops roadmap onboard row, the status comparison, and the setup text. The change builds that row. The written cost is about 120,000 tokens and 1 hour.
Key questions
- Which endpoint and permission does the
webhookrow use?: The row usesGET repos/<owner>/<name>/hookswith the installation token. The App has no Administration permission, so the row treats HTTP 403 or 404 asnot readable. [sources: k8s/README.md] - Which event list is authoritative for the row and the README?:
CONST_ROADMAP_WEBHOOK_EVENTSis the only list. The row renders it. A test compares the rendered list ink8s/README.mdstep 8 with the constant. (best practice) [sources: src/devops_cli/config/constants.py, k8s/README.md, tests/roadmap/test_roadmap_run.py]- Chosen: Use
CONST_ROADMAP_WEBHOOK_EVENTS. One source prevents drift between the row and the README. - Rejected: Copy the event list into the row and the README. Two copies drift and no test can hold them together.
- Chosen: Use
- Which value does the row compare for the webhook content type?: The row accepts
jsoninconfig.content_type. The setup text saysapplication/json. The GitHub API usesjsonfor the JSON content type. (best practice) [sources: k8s/README.md]- Chosen: Compare
config.content_typetojson. This is the API value. The UI name isapplication/json. - Rejected: Compare
config.content_typetoapplication/json. The API returnsjson, so a correct hook would read wrong.
- Chosen: Compare
- How does the row get the Service router URL?: The row derives
https://hooks.<domain>/webhooks/githubfrom the configuredk8s.domainorcloudflare.domain. (best practice) [sources: k8s/README.md]- Chosen: Derive the URL from the configured domain. The router path is fixed and the domain settings already exist.
- Rejected: Add a new
service.webhook_urlsetting. The new setting adds configuration for a fixed router path.
- Should the row create or change a webhook?: No. The row only reads hooks. A webhook carries a secret and is a repository setting, so a person adds it. (best practice) [sources: k8s/README.md, docs/adr/0003-polling-is-how-the-roadmap-sees-changes.md]
- Chosen: Read only. The App has no Administration permission and the row must not print a secret.
- Rejected: Create or patch the hook. The token cannot do it, and the command would handle a secret.
- How does the row treat multiple hooks?: The row reports
presentwhen any active hook fully matches. When no hook matches, it reportswrongfor the first hook and names the first field that differs. It reportsmissingonly when the hooks list is empty. (best practice) [sources: k8s/README.md]- Chosen: Any fully matching active hook is
present. A repository can hold other hooks, such as a CI hook. - Rejected: Exactly one hook must exist. A second unrelated hook would make a correct Service hook read wrong.
- Chosen: Any fully matching active hook is
- How does the row report an unreadable hooks list?: The row reports
not readable as <login>and prints the setup step. It does not fail the command. (best practice) [sources: k8s/README.md]- Chosen: Report a row status and continue. Onboarding shows the other rows and the person can fix the App permission.
- Rejected: Fail the command. The missing Administration permission is expected and must not stop onboarding.
- Which login does the row print when the hooks read is refused?: The row prints the App slug from
service.github_app.slug. The default slug isdevops-cli-service. (best practice) [sources: k8s/README.md]- Chosen: Use the configured App slug. The token belongs to the App and the slug is configured in step 2.
- Rejected: Use the GitHub user login. An installation token has no user login.
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Alternatives check of 2026-11-08: partly.
Tool: gidgethub (https://pypi.org/project/gidgethub), Apache-2.0 AND MIT, last activity 2026-09-25, maintained.
Activity
dan-petty commentedon Nov 6, 2026
Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.
featprefix of the title gives the type.(roadmap)scope of the title gives the scope.It catches a misconfiguration that delays updates, but polling still works so no user is blocked.It prevents a silent delay and gives a person the exact fix step, but the service still functions via polling.The body states the cost is about 120,000 tokens and 1 hour.Both add a row to 'devops roadmap onboard', but #3771 checks RAG ingestion while the candidate checks the repository webhook.devops-cli-service commentedon Nov 7, 2026
Status set to Ready at 517c58b (see proposed design in issue body).
devops-cli-service commentedon Nov 8, 2026
Alternatives check: partly
Reason: The searches found no tool that checks a repository's webhook configuration; they only confirmed that the hooks listing is a GitHub REST API call. gidgethub, the GitHub client the project's session already sends its requests through (ADR 0006), can make that authenticated
GET repos/<owner>/<name>/hooksread, but it covers only the read, not the onboarding row, the status comparison, the permission-safe handling or the setup text.Tool: gidgethub (https://pypi.org/project/gidgethub)
Covers:
GET repos/<owner>/<name>/hooksthrough the project's existing GitHub sessionLacks:
webhookrow ofdevops roadmap onboardand its present/missing/wrong statusnot readable as <login>status when the installation token cannot list hooks (403/404)Tools considered:
Searches run:
Sources:
Checked on 2026-11-08. A person decides what this means for the item. The check changes no label and closes no issue.
feat(roadmap): check the repository webhook on onboarding (#3772)
test(security): declare the webhook URL variable (#3772)
feat(roadmap): check the repository webhook on onboarding (#3772)
devops-cli-service commentedon Nov 14, 2026
Released in v0.141.0: https://github.com/dan-petty/devops-cli/releases/tag/v0.141.0
devops-cli-service commentedon Nov 14, 2026
Live since 2026-11-14 21:08 UTC