Skip to content

Commit

Permalink
updates due to new message formatting for Modal runs
Browse files Browse the repository at this point in the history
  • Loading branch information
b9r5 committed Dec 5, 2024
1 parent 3971120 commit 9b10b2a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/discord-cluster-manager/cogs/verify_run_cog.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ async def verify_github_run(

all_patterns_found = all(
any(
re.match(pattern, content, re.DOTALL) != None
re.search(pattern, content, re.DOTALL) != None
for content in message_contents
)
for pattern in required_patterns
Expand All @@ -69,7 +69,7 @@ async def verify_github_run(
else:
missing_patterns = [
pattern for pattern in required_patterns
if not any(re.match(pattern, content, re.DOTALL)
if not any(re.search(pattern, content, re.DOTALL)
for content in message_contents)
]
await interaction.followup.send(
Expand All @@ -94,11 +94,11 @@ async def verify_modal_run(
required_patterns = [
"Processing `.*` with",
"Running on Modal...",
".*```\nModal execution result:",
"Modal execution result:",
]

all_patterns_found = all(
any(re.match(pattern, content, re.DOTALL) != None
any(re.search(pattern, content, re.DOTALL) != None
for content in message_contents)
for pattern in required_patterns
)
Expand All @@ -110,7 +110,7 @@ async def verify_modal_run(
else:
missing_patterns = [
pattern for pattern in required_patterns
if not any(re.match(pattern, content, re.DOTALL)
if not any(re.search(pattern, content, re.DOTALL)
for content in message_contents)
]
await interaction.followup.send(
Expand Down

0 comments on commit 9b10b2a

Please sign in to comment.