Skip to content

feat(ci): add file list with line stats to PR readiness comment#813

Merged
diberry merged 1 commit intodevfrom
squad/readiness-file-list
Apr 5, 2026
Merged

feat(ci): add file list with line stats to PR readiness comment#813
diberry merged 1 commit intodevfrom
squad/readiness-file-list

Conversation

@diberry
Copy link
Copy Markdown
Collaborator

@diberry diberry commented Apr 4, 2026

Adds a file change summary table to the PR readiness comment showing each file with +/- line counts. Helps reviewers quickly assess PR scope.

Files:

  • scripts/pr-readiness.mjs — add buildFileList() function and integrate into buildChecklist()
  • test/pr-readiness.test.ts — add 16 tests for file list formatting and integration

Copilot AI review requested due to automatic review settings April 4, 2026 14:18
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 4, 2026

🛫 PR Readiness Check

ℹ️ This comment updates on each push. Last checked: commit ccdde89

⚠️ 2 item(s) to address before review

Status Check Details
Single commit 1 commit — clean history
Not in draft Ready for review
Branch up to date Up to date with dev
Copilot review No Copilot review yet — it may still be processing
Changeset present Changeset file found
Scope clean No .squad/ or docs/proposals/ files
No merge conflicts No merge conflicts
Copilot threads resolved 0 active Copilot thread(s) resolved (2 outdated skipped)
CI passing 16 check(s) still running

This check runs automatically on every push. Fix any ❌ items and push again.
See CONTRIBUTING.md and PR Requirements for details.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR enhances the PR readiness comment posted by scripts/pr-readiness.mjs by adding a “Files Changed” markdown section that lists each changed file along with additions/deletions totals, helping reviewers gauge PR scope at a glance.

Changes:

  • Add buildFileList(files) to render a per-file line-stat table plus totals.
  • Extend buildChecklist(...) to optionally append the file list section when files are available.
  • Add unit/integration tests covering file list rendering and inclusion in the upserted PR readiness comment.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
scripts/pr-readiness.mjs Adds buildFileList() and wires it into the readiness comment output via buildChecklist() / run().
test/pr-readiness.test.ts Adds tests for buildFileList() formatting and verifies the file list appears in the posted readiness comment.

Comment thread scripts/pr-readiness.mjs Outdated
Comment thread scripts/pr-readiness.mjs
@diberry diberry force-pushed the squad/readiness-file-list branch from b9cbfd4 to 6e1ca2c Compare April 4, 2026 14:31
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 4, 2026

🏗️ Architectural Review

⚠️ Architectural review: 1 info.

Severity Category Finding Files
ℹ️ info template-sync Template files changed in .github/workflows/ but not in other template locations. If these templates should stay in sync, consider updating the others too. Changed: .github/workflows/, Unchanged: templates/, .squad-templates/, packages/squad-cli/templates/

Automated architectural review — informational only.

@diberry diberry force-pushed the squad/readiness-file-list branch 2 times, most recently from 12c19f3 to 2210f34 Compare April 4, 2026 17:15
@diberry diberry force-pushed the squad/readiness-file-list branch from 2210f34 to 6d7f3c5 Compare April 4, 2026 23:17
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 4, 2026

🟡 Impact Analysis — PR #813

Risk tier: 🟡 MEDIUM

📊 Summary

Metric Count
Files changed 5
Files added 1
Files modified 4
Files deleted 0
Modules touched 4

🎯 Risk Factors

  • 5 files changed (≤5 → LOW)
  • 4 modules touched (2-4 → MEDIUM)

📦 Modules Affected

ci-workflows (1 file)
  • .github/workflows/squad-repo-health.yml
root (2 files)
  • .changeset/readiness-file-list.md
  • CONTRIBUTING.md
scripts (1 file)
  • scripts/pr-readiness.mjs
tests (1 file)
  • test/pr-readiness.test.ts

This report is generated automatically for every PR. See #733 for details.

@diberry diberry force-pushed the squad/readiness-file-list branch 2 times, most recently from 782d333 to 155ab4f Compare April 4, 2026 23:42
Copy link
Copy Markdown
Collaborator

@tamirdresher tamirdresher left a comment

Choose a reason for hiding this comment

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

✅ LGTM — Thorough file list + scope classification with 16 tests. Good markdown safety with sanitizeFilename().

…tles to PR readiness

- Add file list table with per-file +additions/-deletions stats
- Add PR scope classification (Product/Infrastructure/Mixed)
- Rename Architectural Review and Security Review checks with descriptive subtitles

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@diberry diberry force-pushed the squad/readiness-file-list branch from 155ab4f to ccdde89 Compare April 5, 2026 18:18
@diberry diberry merged commit bdc7b8d into dev Apr 5, 2026
18 checks passed
tamirdresher added a commit that referenced this pull request Apr 8, 2026
)

* feat(ci): add file list with line stats, scope badge, and check subtitles to PR readiness (#813)

- Add file list table with per-file +additions/-deletions stats
- Add PR scope classification (Product/Infrastructure/Mixed)
- Rename Architectural Review and Security Review checks with descriptive subtitles

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* ci: scope boundary enforcement for repo-health PRs (#826)

Add CI check that fails when repo-health PRs include product source
code changes under packages/*/src/. Prevents scope creep where
infrastructure PRs accidentally touch product code.

- Add squad-scope-check.yml workflow
- Document PR scope rules in copilot-instructions.md
- Fail loudly on git diff errors instead of silently passing

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* ci: smart PR nudge for stale PRs (#827)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* test: add cross-package export smoke test to catch missing imports

Validates every value import squad-cli uses from squad-sdk resolves to
a defined export at runtime.  Covers 15 SDK subpaths and 50+ named
exports including FSStorageProvider, SquadClient, CastingEngine,
RalphMonitor, and all resolution/config/platform helpers.

Also verifies that every entry in the SDK package.json exports map
points to a file that actually exists on disk.

Motivation: v0.9.3-insider.1 shipped with FSStorageProvider missing
from the SDK barrel — broke users at runtime while all TS-level tests
passed (TypeScript resolves from source, not compiled output).

Refs: #836

---------

Co-authored-by: Dina Berry (MSFT) <diberry@microsoft.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <copilot@github.com>
tamirdresher added a commit that referenced this pull request Apr 21, 2026
)

* feat(ci): add file list with line stats, scope badge, and check subtitles to PR readiness (#813)

- Add file list table with per-file +additions/-deletions stats
- Add PR scope classification (Product/Infrastructure/Mixed)
- Rename Architectural Review and Security Review checks with descriptive subtitles

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* ci: scope boundary enforcement for repo-health PRs (#826)

Add CI check that fails when repo-health PRs include product source
code changes under packages/*/src/. Prevents scope creep where
infrastructure PRs accidentally touch product code.

- Add squad-scope-check.yml workflow
- Document PR scope rules in copilot-instructions.md
- Fail loudly on git diff errors instead of silently passing

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* ci: smart PR nudge for stale PRs (#827)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* test: add cross-package export smoke test to catch missing imports

Validates every value import squad-cli uses from squad-sdk resolves to
a defined export at runtime.  Covers 15 SDK subpaths and 50+ named
exports including FSStorageProvider, SquadClient, CastingEngine,
RalphMonitor, and all resolution/config/platform helpers.

Also verifies that every entry in the SDK package.json exports map
points to a file that actually exists on disk.

Motivation: v0.9.3-insider.1 shipped with FSStorageProvider missing
from the SDK barrel — broke users at runtime while all TS-level tests
passed (TypeScript resolves from source, not compiled output).

Refs: #836

---------

Co-authored-by: Dina Berry (MSFT) <diberry@microsoft.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <copilot@github.com>
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.

3 participants