Skip to content

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Oct 4, 2025

Add HIDE_ITEMS_LIST environment variable to hide issue/PR details table

Summary

Successfully implemented a new environment variable HIDE_ITEMS_LIST that allows users to hide the individual items table in the generated report while keeping all summary metrics visible. This addresses the feature request to provide management with only aggregated metrics without the detailed list of issues/PRs.

Implementation Checklist

  • Add new hide_items_list boolean attribute to EnvVars class in config.py
  • Read HIDE_ITEMS_LIST environment variable in get_env_vars() function (default to False for backward compatibility)
  • Update EnvVars.__init__() to accept hide_items_list parameter
  • Update EnvVars.__repr__() to include hide_items_list
  • Modify write_to_markdown() in markdown_writer.py to conditionally skip writing the items table when hide_items_list is True
  • Add comprehensive tests for the new functionality
  • Update README.md to document the new environment variable
  • Run linting and tests to validate changes
  • Manually verify the implementation works correctly
  • Request and address code review feedback
  • Run prettier on markdown files to fix linting issues

Test Results

✅ All 135 tests pass (up from 133 - added 2 new tests)
✅ Code coverage: 91.42%
✅ Linting: 10.00/10 rating
✅ Manual testing verified correct behavior
✅ Prettier formatting applied to all markdown files

Behavior

  • Default (HIDE_ITEMS_LIST=false): Shows summary metrics + count table + individual items table
  • When HIDE_ITEMS_LIST=true: Shows summary metrics + count table only (items table is hidden)

Backward Compatibility

The default value is false, ensuring all existing workflows continue to work without any changes. Users must explicitly set HIDE_ITEMS_LIST=true to hide the items list.

Original prompt

This section details on the original issue you should resolve

<issue_title>Add env_var to include issue/PR list in the report</issue_title>
<issue_description>### Is your feature request related to a problem?

Right now, Managment only wants to view the statistics and not the details of the report. So, they're not interesested in the list of PRs involved in the metrics.

Describe the solution you'd like

Right now, by default, the list of issues or PRs is included in the report, with no option to exclude it.

It would be ideal to have a new environment variable, maybe called HIDE_ISSUE_LIST (or similar), set to "false" by default (to respect backwards compatibility), to choose if the Issue list should be included in the report or not.
If this new environment variable is set to "true", then report would only include aggregated metrics, like in the following image:

Image

Describe alternatives you've considered

I have considered the possibility of altering the report file once created, to remove the last table, containing the issue list. But for the sake of maintainability, it would be ideal to have this feature as part of the GH Action.

Additional context

None.</issue_description>

Comments on the Issue (you are @copilot in this section)

Fixes #609

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@Copilot Copilot AI changed the title [WIP] Add environment variable to exclude issue list from reports Add HIDE_ITEMS_LIST environment variable to hide individual items table in reports Oct 4, 2025
@Copilot Copilot AI requested a review from zkoppert October 4, 2025 22:19
Copilot finished work on behalf of zkoppert October 4, 2025 22:19
@zkoppert
Copy link
Member

zkoppert commented Oct 6, 2025

@copilot please run prettier on the markdown files to fix the linting issues

@zkoppert zkoppert changed the title Add HIDE_ITEMS_LIST environment variable to hide individual items table in reports feat: Add HIDE_ITEMS_LIST environment variable to hide individual items table in reports Oct 6, 2025
Copy link
Contributor Author

Copilot AI commented Oct 6, 2025

@copilot please run prettier on the markdown files to fix the linting issues

Done! Ran prettier on README.md and fixed the trailing whitespace issue. All markdown files now pass prettier formatting checks.

Copilot finished work on behalf of zkoppert October 6, 2025 17:59
@zkoppert zkoppert marked this pull request as ready for review October 6, 2025 19:27
@zkoppert zkoppert requested a review from a team as a code owner October 6, 2025 19:27
@Copilot Copilot AI review requested due to automatic review settings October 6, 2025 19:27
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds a new environment variable HIDE_ITEMS_LIST that allows users to hide the individual items table in the generated report while keeping all summary metrics visible. This addresses management's need to view only aggregated metrics without detailed issue/PR listings.

  • Add HIDE_ITEMS_LIST environment variable with default value of false for backward compatibility
  • Conditionally skip rendering the individual items table when the variable is set to true
  • Add comprehensive tests and update documentation

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
config.py Adds the new hide_items_list boolean attribute to EnvVars class and environment variable reading logic
markdown_writer.py Implements conditional logic to skip writing the items table when hide_items_list is True
test_config.py Adds test to verify the new environment variable is properly read and updates existing test expectations
test_markdown_writer.py Adds comprehensive test to verify the items table is hidden when HIDE_ITEMS_LIST=true
README.md Documents the new environment variable with description and default value

zkoppert and others added 3 commits October 6, 2025 12:29
Signed-off-by: Zack Koppert <[email protected]>
Co-authored-by: Copilot <[email protected]>
Signed-off-by: Zack Koppert <[email protected]>
Copy link
Member

@zkoppert zkoppert left a comment

Choose a reason for hiding this comment

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

Tested locally! Works great!

Signed-off-by: Zack Koppert <[email protected]>
@zkoppert zkoppert requested a review from jmeridth October 6, 2025 23:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add env_var to include issue/PR list in the report
2 participants