-
Couldn't load subscription status.
- Fork 86
feat: Status column #553
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
feat: Status column #553
Changes from all commits
fb669c9
155da57
38ca291
f6ab3d4
354444a
117b899
543e100
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -39,6 +39,8 @@ class EnvVars: | |
| hide_time_to_close (bool): If true, the time to close metric is hidden in the output | ||
| hide_time_to_first_response (bool): If true, the time to first response metric is hidden | ||
| in the output | ||
| hide_created_at (bool): If true, the created at timestamp is hidden in the output | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. hide_created_at is not related to this change. I just noticed it wasn't properly documented. |
||
| hide_status (bool): If true, the status column is hidden in the output | ||
| ignore_users (List[str]): List of usernames to ignore when calculating metrics | ||
| labels_to_measure (List[str]): List of labels to measure how much time the label is applied | ||
| enable_mentor_count (bool): If set to TRUE, compute number of mentors | ||
|
|
@@ -73,6 +75,7 @@ def __init__( | |
| hide_time_to_close: bool, | ||
| hide_time_to_first_response: bool, | ||
| hide_created_at: bool, | ||
| hide_status: bool, | ||
| ignore_user: List[str], | ||
| labels_to_measure: List[str], | ||
| enable_mentor_count: bool, | ||
|
|
@@ -102,6 +105,7 @@ def __init__( | |
| self.hide_time_to_close = hide_time_to_close | ||
| self.hide_time_to_first_response = hide_time_to_first_response | ||
| self.hide_created_at = hide_created_at | ||
| self.hide_status = hide_status | ||
| self.enable_mentor_count = enable_mentor_count | ||
| self.min_mentor_comments = min_mentor_comments | ||
| self.max_comments_eval = max_comments_eval | ||
|
|
@@ -130,6 +134,7 @@ def __repr__(self): | |
| f"{self.hide_time_to_close}," | ||
| f"{self.hide_time_to_first_response}," | ||
| f"{self.hide_created_at}," | ||
| f"{self.hide_status}," | ||
| f"{self.ignore_users}," | ||
| f"{self.labels_to_measure}," | ||
| f"{self.enable_mentor_count}," | ||
|
|
@@ -238,6 +243,7 @@ def get_env_vars(test: bool = False) -> EnvVars: | |
| hide_time_to_close = get_bool_env_var("HIDE_TIME_TO_CLOSE", False) | ||
| hide_time_to_first_response = get_bool_env_var("HIDE_TIME_TO_FIRST_RESPONSE", False) | ||
| hide_created_at = get_bool_env_var("HIDE_CREATED_AT", True) | ||
| hide_status = get_bool_env_var("HIDE_STATUS", True) | ||
| enable_mentor_count = get_bool_env_var("ENABLE_MENTOR_COUNT", False) | ||
| min_mentor_comments = os.getenv("MIN_MENTOR_COMMENTS", "10") | ||
| max_comments_eval = os.getenv("MAX_COMMENTS_EVAL", "20") | ||
|
|
@@ -259,6 +265,7 @@ def get_env_vars(test: bool = False) -> EnvVars: | |
| hide_time_to_close, | ||
| hide_time_to_first_response, | ||
| hide_created_at, | ||
| hide_status, | ||
| ignore_users_list, | ||
| labels_to_measure_list, | ||
| enable_mentor_count, | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -175,8 +175,12 @@ def get_per_issue_metrics( | |
| issue_with_metrics.time_to_close = measure_time_to_close( | ||
| issue, None | ||
| ) | ||
| if not env_vars.hide_status: | ||
| issue_with_metrics.status = f"{issue.issue.state} as {issue.issue.state_reason}" # type: ignore | ||
| elif issue.state == "open": # type: ignore | ||
| num_issues_open += 1 | ||
| if not env_vars.hide_status: | ||
| issue_with_metrics.status = f"{issue.issue.state}" # type: ignore | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. open issues don't have a |
||
| if not env_vars.hide_created_at: | ||
| if isinstance(issue, github3.search.IssueSearchResult): # type: ignore | ||
| issue_with_metrics.created_at = issue.issue.created_at # type: ignore | ||
|
|
||
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.
HIDE_CREATED_AT is not related to this change. I just noticed it wasn't properly documented.