Add git approval sync per repository#1339
Merged
frankdekker merged 9 commits intomasterfrom Feb 15, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request adds a per-repository toggle to control whether review approvals should be synchronized to GitLab merge requests. This feature allows administrators to selectively enable/disable approval synchronization for individual repositories, providing more granular control over GitLab integration.
Changes:
- Added a new
gitApprovalSyncboolean field to the Repository entity with a default value oftrueto maintain backward compatibility - Updated the message handler to check the repository's approval sync setting before synchronizing reviewer state changes to GitLab
- Added a checkbox control in the repository admin form under the Integrations section (only visible when GitLab integration is configured)
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/Entity/Repository/Repository.php | Added gitApprovalSync boolean property with getter/setter methods following the existing naming convention (isGitApprovalSync()) |
| migrations/Version20260215180800.php | Database migration to add the git_approval_sync column with default value of 1 (enabled) |
| src/MessageHandler/Gitlab/ReviewerStateChangeMessageHandler.php | Added check to skip approval sync when gitApprovalSync is disabled on the repository |
| src/Form/Repository/RepositoryType.php | Added checkbox field for the approval sync setting, conditionally displayed when GitLab is configured |
| templates/app/admin/edit_repository.html.twig | Added UI checkbox in the Integrations section using the existing checkboxFieldRow macro |
| translations/messages+intl-icu.en.php | Added translation key for the checkbox label |
| tests/Unit/Form/Repository/RepositoryTypeTest.php | Updated test to expect 12 form fields instead of 11 |
| tests/Unit/MessageHandler/Gitlab/ReviewerStateChangeMessageHandlerTest.php | Added test for skipping when disabled, updated existing tests to explicitly set the sync flag |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1339 +/- ##
=========================================
Coverage 99.98% 99.98%
- Complexity 3470 3477 +7
=========================================
Files 609 610 +1
Lines 9602 9620 +18
=========================================
+ Hits 9601 9619 +18
Misses 1 1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.