Skip to content

Commit

Permalink
make sure discord handle is complete
Browse files Browse the repository at this point in the history
  • Loading branch information
mattvenn committed Nov 18, 2022
1 parent 01f50fb commit b77f8d9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,13 @@ def check_docs(yaml):
logging.error("missing value for {} in documentation".format(key))
exit(1)

# if provided, check discord handle is valid
if len(yaml['documentation']['discord']):
parts = yaml['documentation']['discord'].split('#')
if len(parts) != 2 or len(parts[0]) == 0 or not re.match('^[0-9]{4}$', parts[1]):
logging.error(f'Invalid format for discord username')
exit(1)


def get_top_module(yaml):
wokwi_id = int(yaml['project']['wokwi_id'])
Expand Down
2 changes: 1 addition & 1 deletion info.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ project:
# This info will be automatically collected and used to make a datasheet for the chip.
documentation:
author: "" # Your name
discord: "" # Your discord handle
discord: "" # Your discord handle - make sure to include the # part as well
title: "" # Project title
description: "" # Short description of what your project does
how_it_works: "" # Longer description of how the project works
Expand Down

0 comments on commit b77f8d9

Please sign in to comment.