CI/CD Identifying active branches

,

Hello,

On the UI there is an interesting view that display the “active” branches : https://gitlab/project/-/branches/active
I would like to use that feature from the CI in order to run a job on “active” branches only.

As far as I know, there is no way to do that. I was thinking to use the API to get and filter the list of branches to retain only the active ones and set a variable if the current branch is an active one. But I have no idea on what is an active branch for the UI.
I guess it is based on the last commit age but not sure that it is not a more smart rule.

What can I do to execute a job only in an active branch?

Thanks