You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Git automation logs GitHub's "Bypassed rule violations" push notice as an error #15524
When main is protected by a GitHub ruleset and the Git automation pushes with a credential that is allowed to bypass it (a deploy key in the ruleset's bypass list), the push succeeds, but GitHub writes a notice to stderr:
remote: Bypassed rule violations for refs/heads/main:
remote:
remote: - Changes must be made through a pull request.
remote:
remote: - Required status check "…" is expected.
Statamic\Console\Processes\Git::prepareErrorOutput() already ignores similar GitHub notices (remote: Resolving deltas, remote: Processed, remote: GitHub found), but not this one, so every successful push is logged at error level. Error trackers (Laravel Nightwatch in our case) then report each content save as an error.
Expected: a push that succeeded isn't logged as an error.
How to reproduce
Protect main with a GitHub ruleset that requires pull requests, and add a deploy key to its bypass list.
Enable the Git automation with pushing, using that deploy key.
Save an entry in the control panel. The commit reaches GitHub, and the log gets the error below.
Logs
production.ERROR: Process Class: Git
Command: 'git' 'push' '--porcelain'
Error: remote: Bypassed rule violations for refs/heads/main:
remote:
remote: - Changes must be made through a pull request.
remote:
remote: - Required status check "…" is expected.
remote:
Adding 'remote: Bypassed rule violations' to the $ignore list in src/Console/Processes/Git.php would cover the first line; the rule lines that follow may arrive in separate stderr chunks. A sturdier option might be to log a push's stderr only when the push exits with a non-zero code, since git push writes routine notices to stderr.
Activity