Branch: refs/heads/master
Home: https://github.com/phpmyadmin/scripts
Commit: d3ce6bcafc8b878f539a6104586a6b80d5ecab89
https://github.com/phpmyadmin/scripts/commit/d3ce6bcafc8b878f539a6104586a6b80d5ecab89
Author: William Desportes <[email protected]>
Date: 2026-09-07 (Mon, 09 September 2026) +02:00

Changed paths: 
A hooks/lib/push_handler.php
A hooks/tests/push_member_branch.phpt
M hooks/README.rst
M hooks/push.php

Log Message:
-----------
hooks: ignore pushes on member branches

Members push their work in progress to `<username>/<topic>` branches on
the main repository; those pushes are not worth a notification email.

Adds is_member_branch() in lib/push_handler.php and calls it from
push.php before building the mail. It only matches refs/heads/, so a tag
named like a member branch still gets announced, and it requires the
`<username>/` prefix, so `williamdes` or `williamdes2/fix` do not match.
The comparison is case insensitive since GitHub logins are, while branch
names are not. The pusher login comes from sender.login, falling back to
pusher.name.

The helper lives in its own lib file because lib/github.php requires the
gitignored config.php, which the tests do not have.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>

_______________________________________________
Git mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to