Add OpenMetadata PR impact analysis action#18
Open
PRADDZY wants to merge 1 commit intoopen-metadata:mainfrom
Open
Add OpenMetadata PR impact analysis action#18PRADDZY wants to merge 1 commit intoopen-metadata:mainfrom
PRADDZY wants to merge 1 commit intoopen-metadata:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR turns the existing MCP impact-analysis cookbook into a reusable CI component by introducing a composite GitHub Action that runs a refactored analyzer (parser/scorer/renderer/CLI) and posts a sticky PR comment plus artifacts.
Changes:
- Added a composite GitHub Action to run impact analysis and expose
risk-level/affected-countoutputs. - Refactored the cookbook analyzer into
diff_parser,risk_scoring,report_renderer, and an updatedbatch_analyzerCLI with deterministic fallback. - Updated the demo workflow and cookbook docs; added unit tests for the new modules.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
.github/actions/openmetadata-impact-analysis/action.yml |
New composite action to run the analyzer and publish outputs/artifacts. |
.github/workflows/impact-analysis.yml |
Workflow now triggers on dbt model/schema changes, runs the composite action, and posts a sticky PR comment + artifacts. |
cookbook/mcp-impact-analysis/batch_analyzer.py |
Refactored CLI entrypoint with deterministic fallback, HTML/JSON outputs, and risk scoring. |
cookbook/mcp-impact-analysis/diff_parser.py |
New diff-to-asset parsing logic with path filtering and change-type detection. |
cookbook/mcp-impact-analysis/risk_scoring.py |
New deterministic scoring based on affected asset links and risk keywords. |
cookbook/mcp-impact-analysis/report_renderer.py |
New Markdown/HTML report rendering with a stable comment marker and escaping. |
cookbook/mcp-impact-analysis/README.md |
Updated usage/docs to describe the new action, outputs, and fallback behavior. |
cookbook/mcp-impact-analysis/tests/* |
New tests covering parser, renderer escaping, scoring, and CLI behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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
Why
This turns the existing demo workflow for open-metadata/OpenMetadata#26648 into a reusable CI/CD path that answers "what breaks if I change this?" before a dbt change is merged. It keeps OpenMetadata access read-only and degrades to a review checklist when AI credentials are unavailable.
Validation
python -m pytest cookbook\mcp-impact-analysis\tests -q-> 7 passedpython -m pytest tests/test_mcp_models.py tests/test_mcp_langchain.py -qfrompython/-> 14 passedpython -m ruff check cookbook\mcp-impact-analysis-> All checks passed.github/actions/openmetadata-impact-analysis/action.ymland.github/workflows/impact-analysis.yml-> yaml okcookbook\mcp-impact-analysis\example_changes.diffwith--no-aiproducedrisk_level: mediumandaffected_count: 0Notes
actionlintwas not available in the local environment, so GitHub Actions semantic linting was not run locally.