HomeSoftware Heritage

storage: Add branch names filtering support in snapshot_get_branches

Description

storage: Add branch names filtering support in snapshot_get_branches

Add optional branch_name_include_substring parameter to snapshot_get_branches,
if provided only branches whose name contains the given substring will be
returned.

Add optional branch_name_exclude_prefix parameter to snapshot_get_branches,
if provided branches whose name starts with the given prefix will not be
returned.

Purpose of these new features: add a search form in the branches view
of swh-web and filter out pull request branches (whose names start with
"refs/pull/") by default.

Related to T2782