Record private webhook configuration and enforced PR merge gate
myfileagent-python-ci/pipeline/pr-main This commit looks good

This commit is contained in:
Codex (authorized Assignment 5 implementation)
2026-10-09 19:08:59 +00:00
parent 02d31699aa
commit b7ef4850b7
4 changed files with 89 additions and 0 deletions
+35
View File
@@ -22,3 +22,38 @@ The printed checkout commit identifies what was actually tested.
Webhook delivery, status reporting, branch protection, and the controlled
failure/repair demonstration must be configured and verified separately.
## Gitea webhook and required merge gate
Configure the repository Gitea webhook with POST, application/json, active,
push and pull-request events, branch filter `*`, and target
`http://jenkins:8080/gitea-webhook/post`. Gitea must allow the exact `jenkins`
host through its webhook destination allowlist; see `compose.webhook.yaml`.
The deployed base Compose file includes this same environment setting.
The hook is configured manually, so Jenkins does not manage repository hooks.
The installed Gitea plugin handler does not verify a shared-secret signature.
Leave the hook secret empty and use the existing private Docker network.
Block `/gitea-webhook` and `/gitea-webhook/*` at the public Caddy site, as in
`Caddyfile.jenkins`. Raw port 8080 remains loopback-only. Do not claim HMAC
authentication, and do not expose the unsigned receiver publicly.
Require `myfileagent-python-ci/pipeline/pr-main` on `main`; this is the
observed PR-head context. The branch context ending `/pipeline/head` is
not the PR context. `main-branch-protection.json` records the applied rule:
no direct or force pushes, one approval, dismiss stale approvals, reject
changes-requested reviews, and no administrator merge override.
October 9, 2026 acceptance exercise, linked to issue #10 and PR #11:
- PR build 1 passed on ad056a3 after a real pull-request-open webhook.
- Commit d6477b3 changed multiplication to addition; PR build 2 failed with
`AssertionError: 13 != 30`; Gitea showed the required check failed.
- Commit 02d3169 restored multiplication; the webhook started PR build 3,
which passed both tests and updated the same required context.
- PR #11 remains open for reviewer nkogut. No review approval or merge has
been performed by automation.
For delivery diagnosis, inspect Gitea's recent delivery response and compare
its event/head SHA with Jenkins' console. A 200 `Processed` delivery alone
is not proof that tests passed. Save the failed and repaired PR gate views
before further commits. A new commit needs a new success status and review.