Skip to content

Commit d71e1c6

Browse files
committed
Fixup GitLab branch regexes
1 parent 522dde2 commit d71e1c6

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/gitsync/gitlab.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,12 @@ def get_url_from_project(self) -> str:
2727

2828
def get_active_branches(self, active_time=timedelta(days=40)) -> List[str]:
2929
branches = set([x.name for x in self.__project__.protectedbranches.list()])
30+
new_branches = set()
3031

31-
if '*' in branches:
32-
branches.remove('*')
32+
for branch in branches:
33+
if '*' not in branch:
34+
new_branches.add(branch)
35+
branches = new_branches
3336

3437
for branch in self.__project__.branches.list(iterator=True):
3538
last_commit = datetime.fromisoformat(branch.commit['committed_date'])

0 commit comments

Comments
 (0)