Skip to content

Add OpenMetadata PR impact analysis action#18

Open
PRADDZY wants to merge 1 commit intoopen-metadata:mainfrom
PRADDZY:hackathon/pr-sentinel
Open

Add OpenMetadata PR impact analysis action#18
PRADDZY wants to merge 1 commit intoopen-metadata:mainfrom
PRADDZY:hackathon/pr-sentinel

Conversation

@PRADDZY
Copy link
Copy Markdown

@PRADDZY PRADDZY commented Apr 19, 2026

Summary

  • Adds a reusable OpenMetadata impact-analysis composite GitHub Action for dbt model/schema pull requests.
  • Refactors the MCP impact-analysis cookbook into testable parser, scorer, renderer, and CLI modules with deterministic fallback output.
  • Updates the demo workflow and cookbook docs so the action posts a sticky PR comment and uploads Markdown/HTML/JSON artifacts.

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 passed
  • python -m pytest tests/test_mcp_models.py tests/test_mcp_langchain.py -q from python/ -> 14 passed
  • python -m ruff check cookbook\mcp-impact-analysis -> All checks passed
  • YAML parse check for .github/actions/openmetadata-impact-analysis/action.yml and .github/workflows/impact-analysis.yml -> yaml ok
  • CLI smoke test on cookbook\mcp-impact-analysis\example_changes.diff with --no-ai produced risk_level: medium and affected_count: 0

Notes

  • actionlint was not available in the local environment, so GitHub Actions semantic linting was not run locally.

@PRADDZY PRADDZY marked this pull request as ready for review April 19, 2026 14:26
Copilot AI review requested due to automatic review settings April 19, 2026 14:26
@PRADDZY PRADDZY changed the title [codex] add OpenMetadata PR impact analysis action Add OpenMetadata PR impact analysis action Apr 19, 2026
Copy link
Copy Markdown

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 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-count outputs.
  • Refactored the cookbook analyzer into diff_parser, risk_scoring, report_renderer, and an updated batch_analyzer CLI 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.

Comment thread .github/actions/openmetadata-impact-analysis/action.yml
Comment thread .github/workflows/impact-analysis.yml
Comment thread cookbook/mcp-impact-analysis/batch_analyzer.py
Comment thread .github/actions/openmetadata-impact-analysis/action.yml
Comment thread .github/actions/openmetadata-impact-analysis/action.yml
Comment thread cookbook/mcp-impact-analysis/batch_analyzer.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants