summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/pyfedpkg/__init__.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/pyfedpkg/__init__.py b/src/pyfedpkg/__init__.py
index 17ac668..0ef21bf 100644
--- a/src/pyfedpkg/__init__.py
+++ b/src/pyfedpkg/__init__.py
@@ -1058,8 +1058,9 @@ class PackageModule:
# Create a list of "fedoras"
fedoras = []
- # Create a regex to find f## branches. Works until Fedora 100
- branchre = re.compile('f\d\d')
+ # Create a regex to find branches that exactly match f##. Should not
+ # catch branches such as f14-foobar
+ branchre = 'f\d\d$'
# Find the repo refs
for ref in self.repo.refs:
@@ -1067,7 +1068,7 @@ class PackageModule:
if type(ref) == git.refs.RemoteReference:
# grab the top level name
branch = ref.name.split('/')[1]
- if branchre.match(branch):
+ if re.match(branchre, branch):
# Add it to the fedoras
fedoras.append(branch)
if fedoras: