Skip to content

ci: maintain source diff counts on ready pull requests - #49

Merged
cquil11 merged 1 commit into
mainfrom
ci/srtctl-diff-comment
Oct 6, 2026
Merged

cquil11 merged 1 commit into
mainfrom
ci/srtctl-diff-comment

Conversation

@cquil11

@cquil11 cquil11 commented Oct 6, 2026 •

Copy link
Copy Markdown

Add one src/srtctl diff: +X -Z comment to open, non-draft pull requests when they become ready for review or receive pushes. Update that same comment when the counts change, including back to +0 -0, and leave it untouched when they do not.

The workflow uses only GitHub API data and serializes comment writes per PR. It also handles PRs opened ready for review, reopened PRs, and base-branch edits.


Note

Low Risk
CI-only change with pull-request write scope; no application code or checkout of PR branches.

Overview
Adds a GitHub Actions workflow that keeps a single bot comment on open, non-draft PRs showing src/srtctl addition/deletion totals (src/srtctl diff: +X -Y).

It runs on pull_request_target (opened, reopened, ready for review, synchronize, edited), uses only the GitHub API (no checkout), sums line changes for paths under src/srtctl/, and creates or updates the marked comment when counts change. Per-PR concurrency avoids overlapping writes; it aborts if the file list looks incomplete (3k-file cap) or the PR head/base/draft state shifts mid-run.

Reviewed by Cursor Bugbot for commit 86f0ed2. Bugbot is set up for automated code reviews on this repo. Configure here.

@cquil11
cquil11 merged commit e12e04e into main Oct 6, 2026
15 checks passed
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