Add protected_branches_except_default to usage ping
What does this MR do?
Adds the protected_branches_except_default to the usage ping.
It will count the number of protected branches in an instance, filtering out those named main, master or the global default setting for new repositories.
Database
Query
SELECT Count("protected_branches"."id")
FROM "protected_branches"
WHERE "protected_branches"."name" NOT IN ( 'main', 'master' )
AND "protected_branches"."id" BETWEEN 0 AND 100000
Summary
Time: 19.938 ms
- planning: 0.214 ms
- execution: 19.724 ms
- I/O read: 0.000 ms
- I/O write: 0.000 ms
Shared buffers:
- hits: 1057 (~8.30 MiB) from the buffer pool
- reads: 0 from the OS file cache, including disk I/O
- dirtied: 0
- writes: 0
Database Lab Links
Screenshots
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides - [-] Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. - [-] Tested in all supported browsers
- [-] Informed Infrastructure department of a default or new setting change, if applicable per definition of done
Mentions #233758 (closed)
Edited by Mayra Cabrera