Skip to content

Commit b6d88e0

Browse files
committed
Avoid feature branches showing up
Filter out branches that are not release-* or main, so 'feature/' do not show up in documentation versions. Signed-off-by: Davide Bettio <davide@uninstall.it>
1 parent 55c4290 commit b6d88e0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

doc/conf.py.in

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,10 +178,12 @@ for tag in tag_list:
178178
release_list.append(tag.name)
179179

180180
omit_branch_list = [ 'release-0.5' ]
181+
allowed_branch_prefixes = ( 'release-', 'main' )
181182
branch_list = sorted(repo.branches, key=lambda t: t.commit.committed_datetime)
182183
for branch in branch_list:
183184
if branch.name not in omit_branch_list:
184-
versions.append(branch.name)
185+
if branch.name.startswith(allowed_branch_prefixes):
186+
versions.append(branch.name)
185187

186188
if ((repo.head.object.hexsha) == (latest_tag.commit.hexsha)):
187189
current_version = latest_tag.name

0 commit comments

Comments
 (0)