-
Notifications
You must be signed in to change notification settings - Fork 15
Closed
Description
The custom branch selection feature from PR #275 is not properly integrated into the webhook handlers, where the check on the received branch is still executed against the default_branch in the case of GitHub and GitLab:
traduttore/inc/WebhookHandler/GitHub.php
Lines 124 to 127 in 9ee3c19
| // We only care about the default branch but don't want to send an error still. | |
| if ( 'refs/heads/' . $params['repository']['default_branch'] !== $params['ref'] ) { | |
| return new WP_REST_Response( [ 'result' => 'Not the default branch' ] ); | |
| } |
traduttore/inc/WebhookHandler/GitLab.php
Lines 82 to 85 in 9ee3c19
| // We only care about the default branch but don't want to send an error still. | |
| if ( 'refs/heads/' . $params['project']['default_branch'] !== $params['ref'] ) { | |
| return new WP_REST_Response( [ 'result' => 'Not the default branch' ] ); | |
| } |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels