feat(metricsai): initial package + CI - #27
Merged
Conversation
Introduce the metricsai Python package and CLI: a pluggable collector that gathers AI-in-SDLC metrics and posts one weekly row to a Google Apps Script webhook. Includes the live `security` module (PyGithub comment scan + AWS Security Hub findings), stub `build_pr`/`testing` modules, keychain-backed secrets, the bundled Apps Script, and docs. Also adds a path-scoped GitHub Actions workflow (metricsai-ci) that runs ruff format --check, ruff check, and pytest via uv on changes to metricsai/. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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
Introduces
metricsai, a concise Python package + CLI that gathers AI-in-SDLC metrics from pluggable modules and posts a single weekly row (week_ending_date+ one field per metric) to a Google Sheets–backed webhook.--module NAME(repeatable) narrows scope.securitymodule (live): scans AI-reviewer PR comments via PyGithub (issue comments, inline review comments, review submissions; filtered by author, week window, and Conventional-Comment label) and counts FAILED CRITICAL/HIGH AWS Security Hub findings via boto3 — emitting allsecurity_*andsecurity_compliance_*columns. Ports of the example shell scripts.build_prandtestingmodules: stubbed placeholders emitting their columns.--github-url), fine-grained least-privilege PAT instructions, andsrt/boto3 sandbox notes.CI
metricsai CI) runsruff format --check,ruff check, andpytestviauv, triggered only on changes tometricsai/**(or the workflow itself).Config / CLI highlights
--repo,--author,--github-url,--week-ending,--tab,--url,--dry-run,--set-token,--set-webhook-key,-v/--debug;METRICSAI_*env vars for all of the above.Testing
uv run pytest— all passing.ruff check/ruff format --check/black --check— clean.uv run mkdocs build— succeeds.--list-modules, stub dry-run, all-modules default, clear errors when repos/key are missing.Notes
{ok: bool}body) and 302-redirects a POST to agoogleusercontentURL, so the client follows redirects and treats the body — not the status code — as the result; auth is a body key (_key), not a header.🤖 Generated with Claude Code