feat: Merged PRs tracking, issue label filtering, AI summary, and commit activity stats - #8
Merged
Conversation
…mit stats Agent-Logs-Url: https://github.com/hondayaya123/RepoWatchDog/sessions/16f45345-dc31-4657-8227-c2a857f97104 Co-authored-by: hondayaya123 <50391999+hondayaya123@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
hondayaya123
April 4, 2026 08:40
View session
hondayaya123
marked this pull request as ready for review
April 4, 2026 08:40
6 tasks
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.
Enhances the weekly report from a basic releases+issues dump into a high-signal digest of meaningful technical activity, with four new capabilities added to
scripts/watch_dog.py.New functions
fetch_merged_prs()—GET /pulls?state=closed&sort=updated&direction=desc, filtered tomerged_at > since; renders a🔀 Merged PRssection (number, title, link, merge date, author)fetch_commit_stats()—GET /commits?since=…; renders a📊 開發活躍度section with total commit count and top-3 contributor breakdowngenerate_ai_summary()— aggregates releases, PRs, and issues across all watched repos into a prompt sent togpt-4o-miniviahttps://models.inference.ai.azure.comusingGITHUB_TOKEN; prepends a ≤150-character Traditional-Chinese summary to the report; fails silentlyModified
fetch_issues()— acceptsimportant_labels: list[str] | None; non-empty list filters to issues carrying at least one matching label; empty list/Nonepreserves original show-all behaviourbuild_report()— collects all repo data upfront (required for cross-repo AI aggregation), then renders sections: AI summary → Merged PRs → Releases → Important Issues → Commit stats; new optional paramsimportant_labelsandai_summarymain()— readsimportant_labelsandai_summaryfromconfig.jsonConfig additions
{ "important_labels": ["bug", "enhancement", "breaking change", "priority/high"], "ai_summary": true }important_labels: []disables filtering (backward-compatible default).Dependencies
openai>=1.0.0added torequirements.txt. TheOpenAIimport is wrapped intry/except ImportErrorso the module loads cleanly without the package (AI summary returnsNone).Tests
19 new unit tests added (29 total); all existing tests updated to supply mock responses for the two additional API calls per repo (
/pulls,/commits).