Skip to content

Commit

Permalink
ci: Add Error handling for no results in issue assign
Browse files Browse the repository at this point in the history
  • Loading branch information
holtskinner committed Jul 31, 2024
1 parent 1aca55a commit 5cc17fb
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/issue_assigner/assign_issue.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,12 @@ def main() -> None:
file_name = file_match.group(1)
result = g.search_code(f"repo:{repo_name} filename:{file_name}")

if not result:
print(f"No files found for {file_name}")
return

if result.totalCount == 0:
result = g.search_code(f"repo:{repo_name} {file_name}")
if result.totalCount == 0:
print(f"No files found for {file_name}")
return
print(result[0])
file = str(base64.b64decode(result[0].content))[:4000]
match = re.search(r"Author.+https://github\.com/([^/\)]+)", file)

Expand Down

0 comments on commit 5cc17fb

Please sign in to comment.