Skip to content

Commit 155da57

Browse files
committed
fix: add hide_status to the env class and fix tests
Signed-off-by: Zack Koppert <[email protected]>
1 parent fb669c9 commit 155da57

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

config.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def __init__(
7575
hide_time_to_close: bool,
7676
hide_time_to_first_response: bool,
7777
hide_created_at: bool,
78-
hide_status: bool, # New attribute
78+
hide_status: bool,
7979
ignore_user: List[str],
8080
labels_to_measure: List[str],
8181
enable_mentor_count: bool,
@@ -105,7 +105,7 @@ def __init__(
105105
self.hide_time_to_close = hide_time_to_close
106106
self.hide_time_to_first_response = hide_time_to_first_response
107107
self.hide_created_at = hide_created_at
108-
self.hide_status = hide_status # Initialize the new attribute
108+
self.hide_status = hide_status
109109
self.enable_mentor_count = enable_mentor_count
110110
self.min_mentor_comments = min_mentor_comments
111111
self.max_comments_eval = max_comments_eval
@@ -134,6 +134,7 @@ def __repr__(self):
134134
f"{self.hide_time_to_close},"
135135
f"{self.hide_time_to_first_response},"
136136
f"{self.hide_created_at},"
137+
f"{self.hide_status},"
137138
f"{self.ignore_users},"
138139
f"{self.labels_to_measure},"
139140
f"{self.enable_mentor_count},"
@@ -242,7 +243,7 @@ def get_env_vars(test: bool = False) -> EnvVars:
242243
hide_time_to_close = get_bool_env_var("HIDE_TIME_TO_CLOSE", False)
243244
hide_time_to_first_response = get_bool_env_var("HIDE_TIME_TO_FIRST_RESPONSE", False)
244245
hide_created_at = get_bool_env_var("HIDE_CREATED_AT", True)
245-
hide_status = get_bool_env_var("HIDE_STATUS", True) # New attribute
246+
hide_status = get_bool_env_var("HIDE_STATUS", True)
246247
enable_mentor_count = get_bool_env_var("ENABLE_MENTOR_COUNT", False)
247248
min_mentor_comments = os.getenv("MIN_MENTOR_COMMENTS", "10")
248249
max_comments_eval = os.getenv("MAX_COMMENTS_EVAL", "20")

test_config.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ def test_get_env_vars_with_github_app(self):
131131
hide_time_to_close=False,
132132
hide_time_to_first_response=False,
133133
hide_created_at=True,
134+
hide_status=True,
134135
ignore_user=[],
135136
labels_to_measure=[],
136137
enable_mentor_count=False,
@@ -186,6 +187,7 @@ def test_get_env_vars_with_token(self):
186187
hide_time_to_close=False,
187188
hide_time_to_first_response=False,
188189
hide_created_at=True,
190+
hide_status=True,
189191
ignore_user=[],
190192
labels_to_measure=[],
191193
enable_mentor_count=False,
@@ -276,6 +278,7 @@ def test_get_env_vars_optional_values(self):
276278
hide_time_to_close=True,
277279
hide_time_to_first_response=True,
278280
hide_created_at=True,
281+
hide_status=True,
279282
ignore_user=[],
280283
labels_to_measure=["waiting-for-review", "waiting-for-manager"],
281284
enable_mentor_count=False,
@@ -320,6 +323,7 @@ def test_get_env_vars_optionals_are_defaulted(self):
320323
hide_time_to_close=False,
321324
hide_time_to_first_response=False,
322325
hide_created_at=True,
326+
hide_status=True,
323327
ignore_user=[],
324328
labels_to_measure=[],
325329
enable_mentor_count=False,

0 commit comments

Comments
 (0)