-
Notifications
You must be signed in to change notification settings - Fork 1
Feature/store server envs #3
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
base: main
Are you sure you want to change the base?
Conversation
|
general notes:
additional naming and file organization notes:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see comments, please make changes and resubmit. thank you for the PR! 🙌
Runtime/EnvHelper.cs
Outdated
| envEntry.Value.ToString() | ||
| ); | ||
| } | ||
| else if (key.Contains("_TICKET_")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't this condition pass for both MM_TICKET_IDS and MM_TICKET_cusfn10msflc73beiik0? I realize that you're relying on the first if to capture the list, but this is prone to issues if a developer comes later and reorders your if statements. If the branches of your if statements are meant to be exclusive it's best to write the conditions more explicit and specific.
Assuming you only want to pass for the first case (list of IDs) you might as well:
| else if (key.Contains("_TICKET_")) | |
| else if (key == "MM_TICKET_IDS") |
Runtime/EnvHelper.cs
Outdated
| envEntry.Value.ToString() | ||
| ); | ||
| } | ||
| else if (key.Contains("_MATCH_ID")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The same applies as above, if there's ever an injected variable MM_FOOBAR_MATCH_ID this condition will attempt to parse it and possibly fail. A more explicit and better condition would be:
| else if (key.Contains("_MATCH_ID")) | |
| else if (key == "MM_MATCH_ID") |
Runtime/EnvHelper.cs
Outdated
| { | ||
| MatchId = envEntry.Value.ToString(); | ||
| } | ||
| else if (key.Contains("_EQUALITY")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as above.
Runtime/EnvHelper.cs
Outdated
| envEntry.Value.ToString() | ||
| ); | ||
| } | ||
| else if (key.Contains("_INTERSECTION")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as above
No description provided.