Skip to content

Commit

Permalink
Add prints for logfile
Browse files Browse the repository at this point in the history
  • Loading branch information
mjaehn committed Feb 5, 2025
1 parent 6f59e34 commit 18d96c8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/validate_user_input.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@ def validate_user_input(comment_body):
match = re.search(r'```json(.*?)```', comment_body, re.DOTALL)
if match:
json_content = match.group(1).strip()
print(json_content)
return json_content
raise ValueError('No JSON content found in the comment body')

def convert_to_json(comment_body):
# Convert the dictionary back to a JSON string
json_str = json.dumps(json.loads(comment_body), indent=4)
print(json_str)

# Write the JSON string to a file
with open('config.json', 'w') as f:
Expand Down

0 comments on commit 18d96c8

Please sign in to comment.