Skip to content

Commit 55f62ca

Browse files
v1.3.7 -- fix bad branch parsing regex
1 parent fee3bcb commit 55f62ca

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

markten/actions/__git.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,13 @@ async def branch_exists(
4949
*("--remote" if remote else ()),
5050
)
5151
if remote is False:
52-
regex = re.compile(rf"^\*?\s+{branch}$")
52+
regex = re.compile(rf"^\s*\*?\s*{branch}$")
5353
else:
5454
remote_name = DEFAULT_REMOTE if remote is True else remote
55-
regex = re.compile(rf"^\*?\s+{remote_name}/{branch}$")
55+
regex = re.compile(rf"^\s*\*?\s*{remote_name}/{branch}$")
5656

57-
for remote_branch in remote_branches.splitlines():
58-
if regex.search(remote_branch.strip()) is not None:
57+
for b in remote_branches.splitlines():
58+
if regex.search(b.strip()) is not None:
5959
return True
6060

6161
return False

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "markten"
3-
version = "1.3.6"
3+
version = "1.3.7"
44
description = "Assess your students' work with all of the delight and none of the tedium"
55
authors = [{ name = "Maddy Guthridge", email = "[email protected]" }]
66
requires-python = ">= 3.11"

uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)