Skip to content

feat: add Husky.Net README badge sync hook and clean up 3-Series leftovers - #37

Merged
jkdevito merged 9 commits into
mainfrom
feature/husky-readme-badges
Sep 30, 2026
Merged

jkdevito merged 9 commits into
mainfrom
feature/husky-readme-badges

Conversation

@jkdevito

Copy link
Copy Markdown
Contributor

Summary (what/why):

  • Adds Husky.Net pre-commit hook that syncs README badges.
  • Installs git hooks automatically on folder open in VS Code.
  • Documents Husky.Net setup/usage in README.
  • Removes unused CI scripts and 3-Series leftovers.
  • Ignores *.code-workspace.
  • Updates copyright year.

Testing: not run beyond local hook install.

Notes for reviewers: 15 files changed (+223/-266); contributors need dotnet tool restore && dotnet husky install (runs automatically via VS Code task).

Update the .NET and PepperDash Essentials badges from TargetFramework and MinimumEssentialsFrameworkVersion. Hooks install on restore.
Remove GenerateVersionNumber, UpdateAssemblyVersion and ZipBuildOutput scripts.
…ight year

Delete GetPackages.BAT and the 3Series csproj, drop Peacock colors from VS Code settings, ignore *.code-workspace, and bump copyright to 2026.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

The misplaced tool manifest prevents hook installation, and the hook can unintentionally stage unrelated README edits.

Review effort: Balanced
Findings: 2 Medium severity · 1 Low severity

Open (3)
What changed in this PR

Adds Husky.Net automation to synchronize README badges while removing legacy 3-Series and CI artifacts.

Changes:

  • Adds badge synchronization and automatic hook installation.
  • Documents hook setup and usage.
  • Removes obsolete 3-Series and CI files.
File Description
src/​epi-make-model.4Series.csproj Updates copyright year.
src/​epi-make-model.3Series.csproj Removes legacy project.
src/​Directory.Build.targets Adds hook installation target.
README.md Adds badges and hook documentation.
GetPackages.BAT Removes obsolete package script.
dotnet-tools.json Declares Husky.Net tool.
.vscode/​tasks.json Adds folder-open hook installation.
.vscode/​settings.json Removes color customization.
.husky/​task-runner.json Configures badge synchronization.
.husky/​pre-commit Runs Husky tasks before commits.
.gitignore Ignores workspace files.
.github/​scripts/​ZipBuildOutput.ps1 Removes unused packaging script.
.github/​scripts/​UpdateAssemblyVersion.ps1 Removes legacy version script.
.github/​scripts/​Update-ReadmeBadges.ps1 Implements badge synchronization.
.github/​scripts/​GenerateVersionNumber.ps1 Removes legacy version generator.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread .github/scripts/Update-ReadmeBadges.ps1 Outdated
Comment thread .config/dotnet-tools.json
Comment thread README.md Outdated
- Update-ReadmeBadges: in -Stage mode fail when README.md or badge inputs have unstaged changes
- README: document Windows PowerShell 5.1 check command and the unstaged-changes guard

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

The hook can derive badges from uncommitted files or silently fail to stage them, and VS Code installation is not reliable with Windows PowerShell 5.1.

Review effort: Balanced
Findings: 2 Medium severity

Open (2)
Resolved since last review (2)
Previously missed (2)

In code that hasn't changed since last review

Medium severity Handle git add failures to prevent stale badge commits

.github/​scripts/​Update-ReadmeBadges.ps1:109

A failed git add is a native-command failure and is not converted into a terminating PowerShell error by $ErrorActionPreference. The script can therefore report success to Husky without staging the updated README (for example, when the index is locked), allowing a stale badge commit. Check $LASTEXITCODE and fail the hook.

Medium severity Pin VS Code task shell to PowerShell 7

.vscode/​tasks.json:7

This folder-open task uses whichever shell VS Code selected. On Windows that may still be Windows PowerShell 5.1, where && is a syntax error, even when the required pwsh executable is installed. Pin the task shell to PowerShell 7 so the advertised automatic install works independently of the user's default terminal profile.

Comment thread .github/scripts/Update-ReadmeBadges.ps1 Outdated
- Update-ReadmeBadges: include untracked badge inputs in the -Stage guard
- Update-ReadmeBadges: fail the hook when git add fails
- tasks.json: run the install task under pwsh so && works on Windows
- README: mention untracked files in the guard note
@jkdevito
jkdevito merged commit 79b421e into main Sep 30, 2026
3 checks passed
@jkdevito
jkdevito deleted the feature/husky-readme-badges branch September 30, 2026 16:47
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