Add support for TUNIT_DISABLE_GITHUB_REPORTER environment variable#2716
Add support for TUNIT_DISABLE_GITHUB_REPORTER environment variable#2716
Conversation
Co-authored-by: thomhurst <30480171+thomhurst@users.noreply.github.com>
…able Co-authored-by: thomhurst <30480171+thomhurst@users.noreply.github.com>
DISABLE_GITHUB_REPORTER environment variable should be named TUNIT_DISABLE_GITHUB_REPORTER|
Claude finished @Copilot's task —— View job PR Review Complete ✅I've thoroughly reviewed this PR and it looks excellent overall. The implementation is solid with good test coverage and follows established patterns. 🟢 StrengthsCore Implementation (
|
This PR adds support for the new
TUNIT_DISABLE_GITHUB_REPORTERenvironment variable while maintaining full backward compatibility with the existingDISABLE_GITHUB_REPORTERvariable.Problem
The existing
DISABLE_GITHUB_REPORTERenvironment variable lacks theTUNIT_prefix that follows the established naming convention used by other frameworks:GITHUB_DOTNET_GOSolution
Modified the
GitHubReporter.IsEnabledAsync()method to check for both environment variables:Changes Made
GitHubReporter.csto support both environment variables with equal priorityGitHubReporterTests.cscovering all scenarios:TUNIT_DISABLE_GITHUB_REPORTERsetDISABLE_GITHUB_REPORTERsetBackward Compatibility
Existing workflows using
DISABLE_GITHUB_REPORTERwill continue to work without any changes. Both variables have equal priority - if either is set, the GitHubReporter will be disabled.Testing
All 4 new unit tests pass successfully, confirming the implementation works correctly for all combinations of environment variable settings.
Fixes #2599.
💡 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.