GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Action size: Add a PR check that comments on significant repo size changes by henrymercer · Pull Request #3910 · github/codeql-action

Conversation

@henrymercer

@henrymercer henrymercer commented May 18, 2026

Copy link
Copy Markdown
Contributor

The compressed checkout of the repo is downloaded at the start of every CodeQL job. Significant jumps or drops are worth surfacing since they directly affect job startup time.

To that end, this PR adds a "Check repo size" PR check that streams git archive --format=tar.gz for both the PR base and HEAD, compares the compressed sizes, and posts a sticky comment when the difference is at least 10% in either direction.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@henrymercer
Add a PR check that comments on significant repo size changes
4fc0f3e
Copilot AI review requested due to automatic review settings May 18, 2026 15:37
@henrymercer
henrymercer requested a review from a team as a code owner May 18, 2026 15:37
@github-actions github-actions Bot added the size/XL May be very hard to review label May 18, 2026
Copilot started reviewing on behalf of henrymercer May 18, 2026 15:38
View session
github-advanced-security[bot]
github-advanced-security Bot found potential problems May 18, 2026
View reviewed changes
Comment thread pr-checks/check-repo-size.ts Fixed

Uh oh!

There was an error while loading. Please reload this page.

Comment thread pr-checks/check-repo-size.ts Fixed

Uh oh!

There was an error while loading. Please reload this page.

Comment thread pr-checks/check-repo-size.ts Fixed

Uh oh!

There was an error while loading. Please reload this page.

Copilot AI reviewed May 18, 2026
View reviewed changes

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a PR workflow and TypeScript helper to measure compressed repository archive size changes between a PR and its base, then post/update a sticky PR comment when the delta is significant.

Changes:

  • Added a Check repo size workflow.
  • Added pr-checks/check-repo-size.ts with archive measurement, formatting, and PR comment upsert logic.
  • Added unit tests and pr-check dependency updates for Sinon-based Octokit mocking.
Show a summary per file
File Description
.github/workflows/check-repo-size.yml Runs the repo size check on PR events.
pr-checks/check-repo-size.ts Implements archive size measurement and sticky PR comment behavior.
pr-checks/check-repo-size.test.ts Tests formatting, archive measurement, and comment upsert behavior.
pr-checks/package.json Adds Sinon test dependencies for pr-checks.
package-lock.json Updates lockfile metadata for pr-checks dependencies.

Copilot's findings

  • Files reviewed: 4/5 changed files
  • Comments generated: 5

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread pr-checks/check-repo-size.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread .github/workflows/check-repo-size.yml Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread .github/workflows/check-repo-size.yml Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread pr-checks/check-repo-size.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread .github/workflows/check-repo-size.yml Resolved

Uh oh!

There was an error while loading. Please reload this page.

mbg
mbg reviewed May 18, 2026
View reviewed changes

@mbg mbg left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for looking at this! Two high-level design questions:

  1. Could we add this on to an existing workflow (pr-checks?) rather than adding a totally new one?
  2. Rather than comparing to the PR base ref, would it make sense to compare to the latest CodeQL Action release instead?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread .github/workflows/check-repo-size.yml Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread pr-checks/check-repo-size.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

@henrymercer
henrymercer marked this pull request as draft May 18, 2026 16:03
henrymercer added 3 commits May 18, 2026 17:15
@henrymercer
Default setup env vars: Restrict results to src
6f8805e
@henrymercer
Unify checks into a single job
bcffb2b
@henrymercer
Address review comments
5a80681
@henrymercer

henrymercer commented May 18, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor Author

Rather than comparing to the PR base ref, would it make sense to compare to the latest CodeQL Action release instead?

With that approach, if we merge a PR that significantly increases / decreases the repo size, this would create noise on all subsequent PRs until the next release. Since we compare against the base, we'll get the comparison against the latest release when we run the release process, so we have another opportunity to see significant changes at that point.

mbg reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@henrymercer
Merge branch 'main' into henrymercer/repo-size-diff-check
b5b50d6
@henrymercer
henrymercer force-pushed the henrymercer/repo-size-diff-check branch from 7e6ce16 to b34c6b4 Compare May 18, 2026 17:20
@henrymercer
Tweak workflow
9b6438e
@henrymercer
henrymercer force-pushed the henrymercer/repo-size-diff-check branch from b34c6b4 to 9b6438e Compare May 18, 2026 17:25
@henrymercer
henrymercer requested a review from Copilot May 18, 2026 18:09
Copilot started reviewing on behalf of henrymercer May 18, 2026 18:09
View session
Copilot AI reviewed May 18, 2026
View reviewed changes

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot's findings

  • Files reviewed: 5/6 changed files
  • Comments generated: 6

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread .github/workflows/pr-checks.yml Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread .github/workflows/pr-checks.yml Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread .github/workflows/pr-checks.yml Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread .github/workflows/pr-checks.yml Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread pr-checks/check-repo-size.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread pr-checks/check-repo-size.test.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

@henrymercer henrymercer changed the title Add a PR check that comments on significant repo size changes Action size: Add a PR check that comments on significant repo size changes May 18, 2026
@henrymercer
Address review comments
15a712b
@henrymercer
henrymercer requested a review from Copilot May 18, 2026 19:09
Copilot started reviewing on behalf of henrymercer May 18, 2026 19:10
View session
Copilot AI reviewed May 18, 2026
View reviewed changes

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot's findings

Comments suppressed due to low confidence (1)

.github/workflows/pr-checks.yml:225

  • Because body comes from an artifact produced by PR-controlled code, passing it with gh api --field is unsafe: --field body=@path makes the CLI read a local file, so a malicious body could cause this privileged job to post files such as its environment. Use a raw field or file input only after constructing/validating the body in trusted code.
            gh api --method PATCH "repos/$GITHUB_REPOSITORY/issues/comments/$comment_id" --field body="$body"
          elif [[ "$significant" == "true" ]]; then
            echo "Creating new repo size comment."
            gh api --method POST "repos/$GITHUB_REPOSITORY/issues/$PR_NUMBER/comments" --field body="$body"
  • Files reviewed: 5/5 changed files
  • Comments generated: 1

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread .github/workflows/pr-checks.yml Resolved

Uh oh!

There was an error while loading. Please reload this page.

@henrymercer
Pass comment body file directly
2c8faa5
@henrymercer
henrymercer marked this pull request as ready for review May 18, 2026 19:29
@henrymercer
henrymercer requested a review from mbg May 19, 2026 14:50
mbg
mbg reviewed May 20, 2026
View reviewed changes

@mbg mbg left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for investing the time into putting this together! This makes sense both given the work we have done recently on decreasing the repo size and as a follow-up to #3808

I don't think there's anything blocking here, but I have had a few comments that we'll want to review.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread pr-checks/check-repo-size.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread pr-checks/check-repo-size.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread pr-checks/check-repo-size.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread pr-checks/check-repo-size.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread .github/workflows/pr-checks.yml Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread .github/workflows/pr-checks.yml Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread .github/workflows/pr-checks.yml Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread .github/workflows/pr-checks.yml Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread .github/workflows/pr-checks.yml Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread .github/workflows/pr-checks.yml Resolved

Uh oh!

There was an error while loading. Please reload this page.

@henrymercer
Address review comments
a14f75e
github-advanced-security[bot]
github-advanced-security Bot found potential problems May 20, 2026
View reviewed changes
Comment thread .github/workflows/pr-checks.yml Dismissed

Uh oh!

There was an error while loading. Please reload this page.

@henrymercer
Revert getErrorMessage import
f3f52bf
To avoid requiring additional dependencies
@henrymercer
henrymercer requested a review from mbg May 20, 2026 16:18
mbg
mbg previously approved these changes May 20, 2026
View reviewed changes
@henrymercer
Update excluded required check list
72ac23c
@henrymercer
henrymercer dismissed mbg’s stale review via 72ac23c May 21, 2026 09:16
@henrymercer
henrymercer requested a review from mbg May 21, 2026 09:17
mbg
mbg approved these changes May 21, 2026
View reviewed changes
@henrymercer
henrymercer added this pull request to the merge queue May 21, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks May 21, 2026

Uh oh!

There was an error while loading. Please reload this page.

@henrymercer
henrymercer added this pull request to the merge queue May 21, 2026
Merged via the queue into main with commit 8449852 May 21, 2026
225 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@henrymercer
henrymercer deleted the henrymercer/repo-size-diff-check branch May 21, 2026 10:40
This was referenced May 22, 2026
Merge main into releases/v4 #3927
Merged
Merge releases/v4 into releases/v3 #3929
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

Copilot code review Copilot
Copilot review effort
Applies to this pull request for everyone.Learn more about Copilot code review.
Copilot left review comments
@mbg mbg mbg approved these changes
+1 more reviewer
@github-advanced-security github-advanced-security[bot] github-advanced-security[bot] left review comments
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

size/XL May be very hard to review

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@henrymercer @mbg @github-advanced-security
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.