Skip to content

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

Availability and Testing

Mentions #233758 (closed)

Edited by Mayra Cabrera

Merge request reports

Loading