Skip to content

Pull request summary comment: what changes and whether it can be merged - #245

Merged
ChristianHandy merged 1 commit into
mainfrom
pr-summary
Oct 22, 2026
Merged

ChristianHandy merged 1 commit into
mainfrom
pr-summary

Conversation

@ChristianHandy

Copy link
Copy Markdown
Owner

Summary

Adds a bot comment to every pull request, like Home Assistant's review comments, but without AI: it says whether the pull request can be merged and what it changes. It is created once and updated whenever Pull request check, Tests or CodeQL finishes.

The comment shows:

  • a verdict: Ready to merge / Waiting for checks / Not ready to merge (failed required checks, merge conflicts, draft)
  • the changed files grouped by area (app code, web pages, tests, CI, dependencies, Android, docs, ...)
  • each required check with a link to its log
  • other failed checks
  • a short "how to fix" per failed check (e.g. the /allow-ai <sha> line for AI assistance)

Separately, I turned on automatic Copilot code review with a repository ruleset ("Copilot code review", main, on every push, not on drafts). That's a setting, not part of this diff.

Changes

  • scripts/pr_summary.py: builds and posts or updates the comment (GitHub API only, never the PR's code)
  • .github/workflows/pr-summary.yml: workflow_run trigger, runs from main with pull-requests: write, checks out main only; the head SHA goes through an env variable
  • tests/test_pr_summary.py: 8 tests (areas, re-runs, verdicts, rendering, create vs. update of the comment, outdated commits)
  • CONTRIBUTING.md, CHANGELOG.md

workflow_run workflows only run from the default branch, so the comment won't appear on this pull request; it starts on the next ones after merging.

Verification

  • pytest tests/test_pr_summary.py tests/test_license_headers.py: 8 passed; pr_summary.py 88 % covered
  • ruff check: passed
  • zizmor --persona pedantic: no findings (1 documented ignore: dangerous-triggers)
  • Rendered against the open PR test: add initial system monitor tests #241 read-only: correct verdict, checks and hints

AI assistance

Prepared with Claude Code.

🤖 Generated with Claude Code

One comment per pull request, updated whenever Pull request check, Tests
or CodeQL finishes: verdict (required checks, conflicts, draft), changed
files by area, other failed checks and a fix hint per failed check.
Runs on workflow_run from main and only reads the GitHub API.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: ChristianHandy <christianhandy180@gmail.com>
@github-actions

Copy link
Copy Markdown
Contributor

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

OpenSSF Scorecard

PackageVersionScoreDetails
actions/actions/checkout 3d3c42e5aac5ba805825da76410c181273ba90b1 🟢 5.9
Details
CheckScoreReason
Maintained⚠️ 00 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Code-Review🟢 10all changesets reviewed
Binary-Artifacts🟢 10no binaries found in the repo
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Pinned-Dependencies🟢 3dependency not pinned by hash detected -- score normalized to 3
Fuzzing⚠️ 0project is not fuzzed
License🟢 10license file detected
Packaging⚠️ -1packaging workflow not detected
Signed-Releases⚠️ -1no releases found
Security-Policy🟢 9security policy file detected
Branch-Protection🟢 6branch protection is not maximal on development and all release branches
SAST🟢 10SAST tool is run on all commits

Scanned Files

  • .github/workflows/pr-summary.yml

@ChristianHandy

ChristianHandy commented Oct 22, 2026 •

Copy link
Copy Markdown
Owner Author

/allow-ai 41e2891 PR summary bot, reviewed

@ChristianHandy
ChristianHandy merged commit 49bdd06 into main Oct 22, 2026
27 of 28 checks passed
@ChristianHandy
ChristianHandy deleted the pr-summary branch October 22, 2026 10:40
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.

1 participant