Repository navigation
ci: maintain source diff counts on ready pull requests - #49
Merged
Merged
Conversation
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.
Add one
src/srtctl diff: +X -Zcomment 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/srtctladdition/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 undersrc/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.