Skip to content

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

Merged
merged 7 commits into from
Jul 18, 2025
Merged

feat: Status column #553

merged 7 commits into from
Jul 18, 2025

Conversation

zkoppert
Copy link
Member

@zkoppert zkoppert commented Jul 18, 2025

Pull Request

This pull request introduces a new "Status" column to the issue metrics system and makes it configurable through an environment variable (HIDE_STATUS). It also updates the relevant classes, docs, functions, and tests to support this feature.

Here is an example report with HIDE_STATUS set to false:
Screenshot 2025-07-17 at 6 39 25 PM

fixes #552

Proposed Changes

New Feature: Status Column

  • Added a status attribute to the IssueWithMetrics class to store issue statuses (e.g., "open", "closed as completed") (classes.py, [1] [2] [3].
  • Updated the get_per_issue_metrics function to populate the status field based on the issue's state and state reason (issue_metrics.py, issue_metrics.pyR178-R183).

Configuration Updates

  • Introduced a new environment variable HIDE_STATUS to control the visibility of the "Status" column in the output (config.py, [1] [2] [3] [4] [5] [6].
  • Updated the README to document the new HIDE_STATUS environment variable (README.md, README.mdL157-R158).

Markdown Generation Enhancements

  • Modified the get_non_hidden_columns function and Markdown-writing logic to include the "Status" column when not hidden (markdown_writer.py, [1] [2] [3].

Test Coverage

  • Added unit tests to verify the functionality of the HIDE_STATUS environment variable and the inclusion of the "Status" column in the output (test_config.py, [1] [2] [3] [4]; test_markdown_writer.py, [5] [6] [7] [8]; test_assignee_functionality.py, [9].

These changes enhance the flexibility and usability of the issue metrics system by allowing users to track and customize the visibility of issue statuses.

Readiness Checklist

Author/Contributor

  • If documentation is needed for this change, has that been included in this pull request
  • run make lint and fix any issues that you have introduced
  • run make test and ensure you have test coverage for the lines you are introducing
  • If publishing new data to the public (scorecards, security scan results, code quality results, live dashboards, etc.), please request review from @jeffrey-luszcz

Reviewer

  • Label as either fix, documentation, enhancement, infrastructure, maintenance, or breaking

zkoppert added 4 commits July 17, 2025 23:20
Signed-off-by: Zack Koppert <zkoppert@github.com>
Signed-off-by: Zack Koppert <zkoppert@github.com>
Signed-off-by: Zack Koppert <zkoppert@github.com>
Signed-off-by: Zack Koppert <zkoppert@github.com>
@zkoppert zkoppert self-assigned this Jul 18, 2025
@@ -154,7 +154,8 @@ This action can be configured to authenticate with GitHub App Installation or Pe
| `HIDE_TIME_TO_ANSWER` | False | False | If set to `true`, the time to answer a discussion will not be displayed in the generated Markdown file. |
| `HIDE_TIME_TO_CLOSE` | False | False | If set to `true`, the time to close will not be displayed in the generated Markdown file. |
| `HIDE_TIME_TO_FIRST_RESPONSE` | False | False | If set to `true`, the time to first response will not be displayed in the generated Markdown file. |
| `HIDE_CREATED_AT` | False | True | If set to `true`, the creation timestmap will not be displayed in the generated Markdown file. |
| `HIDE_STATUS` | False | True | If set to `true`, the status column will not be shown |
| `HIDE_CREATED_AT` | False | True | If set to `true`, the creation timestamp will not be displayed in the generated Markdown file. |
Copy link
Member Author

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.

@@ -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
Copy link
Member Author

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.

elif issue.state == "open": # type: ignore
num_issues_open += 1
if env_vars.hide_status is False:
issue_with_metrics.status = f"{issue.issue.state}" # type: ignore
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

open issues don't have a state_reason

Signed-off-by: Zack Koppert <zkoppert@github.com>
@zkoppert zkoppert marked this pull request as ready for review July 18, 2025 02:47
@zkoppert zkoppert requested a review from a team as a code owner July 18, 2025 02:47
Copy link
Member

@jmeridth jmeridth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small suggestions but not blockers. Results are same.

zkoppert and others added 2 commits July 17, 2025 21:00
Co-authored-by: Jason Meridth <35014+jmeridth@users.noreply.github.com>
Signed-off-by: Zack Koppert <zkoppert@github.com>
Co-authored-by: Jason Meridth <35014+jmeridth@users.noreply.github.com>
Signed-off-by: Zack Koppert <zkoppert@github.com>
@zkoppert zkoppert enabled auto-merge July 18, 2025 04:03
@zkoppert zkoppert merged commit f5c0d3b into main Jul 18, 2025
33 checks passed
@zkoppert zkoppert deleted the status-column branch July 18, 2025 04:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Current status visibility
2 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy