-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[feat] Add initial implementation of RepoBee 4 review commands (#868)
- Loading branch information
Showing
6 changed files
with
322 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
"""Module for dealing with feature flags.""" | ||
import os | ||
import enum | ||
|
||
__all__ = ["FEATURE_ENABLED_VALUE", "FeatureFlag", "is_feature_enabled"] | ||
|
||
FEATURE_ENABLED_VALUE = "true" | ||
|
||
|
||
class FeatureFlag(enum.Enum): | ||
REPOBEE_4_REVIEW_COMMANDS = "REPOBEE_4_REVIEW_COMMANDS" | ||
|
||
|
||
def is_feature_enabled(flag: FeatureFlag) -> bool: | ||
"""Check if a feature is enabled. | ||
Args: | ||
flag: A feature flag. | ||
""" | ||
return os.getenv(flag.value) == FEATURE_ENABLED_VALUE |
Oops, something went wrong.