Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Standardize boolean values and fix pattern for .env file #1391

Open
hcaumo opened this issue Dec 23, 2024 · 1 comment
Open

Standardize boolean values and fix pattern for .env file #1391

hcaumo opened this issue Dec 23, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@hcaumo
Copy link

hcaumo commented Dec 23, 2024

Title: Standardize boolean values and fix pattern for .env file

Describe the bug
The .env file contains some inconsistencies in how boolean values and specific strings are represented. For instance, the variable POST_IMMEDIATELY uses the string "NO", while a boolean value like TWITTER_SEARCH_ENABLE uses false. This inconsistency could lead to parsing issues and is prone to human error.

To Reproduce

  1. Open the .env file. 2. Observe that POST_IMMEDIATELY=NO is used instead of the expected false.

Expected behavior
Boolean variables should consistently use true or false, and all string-based boolean values such as POST_IMMEDIATELY should use true/false instead of "YES"/"NO".

Additional context
This change will standardize boolean values, making the .env file easier to parse and reducing the risk of errors. The parseBooleanFromText function, declared as const parseBooleanFromText: (text: string) => boolean;, can be used outside the .env context to ensure boolean parsing is consistent across the codebase.

Guidelines for .env values

  1. Boolean values: Always use true or false (not "YES" or "NO").
    Example: TWITTER_SEARCH_ENABLE=true POST_IMMEDIATELY=false

Adhering to these guidelines will ensure consistency and make it easier for automated scripts to process the .env file while reduce human error.

@samarth30
Copy link
Collaborator

@hcaumo I think the POST_IMMEDIATELY is boolean only rather than YES and No.

@samarth30 samarth30 self-assigned this Dec 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants