feat: make report Google Analytics configurable - #784
Open
grootstebozewolf wants to merge 5 commits into
Open
Conversation
Allow disabling GA via plugin option analyticsEnable or ALLURE_NO_ANALYTICS env (Allure 2 parity) across awesome, classic, dashboard, and allure2 reports.
Member
|
maybe we should promote |
Address PR review feedback: use a single top-level analyticsEnable knob (plus ALLURE_NO_ANALYTICS env) instead of per-plugin options, and pass the resolved flag via PluginContext to report generators.
Bring fix/476-configurable-analytics up to date with allure-framework/main and keep core analyticsEnable wiring in allure2/awesome/classic generators.
|
Hello team It seems like the review comment has been addressed. is there anything else preventing release of this? This missing flag is a blocker for some teams looking to upgrade to Allure v3 |
Member
|
BTW I would rename |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
isAnalyticsEnabled()helper in@allurereport/plugin-api(Allure 2ALLURE_NO_ANALYTICSparity).analyticsEnableto core config (not per-plugin), resolve once inAllureReport, and pass viaPluginContextto awesome, classic, dashboard, and allure2 generators so GA can be omitted from report HTML.Fixes #476
Usage
Or environment (Allure 2 style):
export ALLURE_NO_ANALYTICS=trueEnv opt-out wins over the core config option.
Test plan
yarn workspace @allurereport/plugin-api test— analytics resolver casesyarn workspace @allurereport/core test— config resolve includesanalyticsEnableyarn workspace @allurereport/plugin-allure2 test— generateStaticFiles embeds/omits gtag for default, option false, and env trueyarn workspace @allurereport/plugin-awesome test— plugin context fixtures