Skip to content

Commit

Permalink
Throw error on wrong category (#3526)
Browse files Browse the repository at this point in the history
  • Loading branch information
ludeeus authored Apr 12, 2024
1 parent fe57b80 commit a4ebc9a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions action/action.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,9 @@ async def preflight():
if category is None:
error("No category found, use env CATEGORY to set this.")

if category not in CATEGORIES:
error(f"Category {category} is not valid.")

if ref is None and GITHUB_REPOSITORY != HacsGitHubRepo.DEFAULT:
repo = await hacs.githubapi.repos.get(repository)
ref = repo.data.default_branch
Expand Down

0 comments on commit a4ebc9a

Please sign in to comment.