Skip to content

Commit db7fa16

Browse files
committed
Merge pull request #1719 from bettio/doc-allowed-branch-prefixes
Avoid feature branches showing up These changes are made under both the "Apache 2.0" and the "GNU Lesser General Public License 2.1 or later" license terms (dual license). SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later
2 parents 55c4290 + b6d88e0 commit db7fa16

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)