fix(headers): preserve original year when normalizing headers#285
Merged
Conversation
Contributor
🏗️ PR Added to Squad Triage QueueThis PR has been labeled with Next steps:
|
There was a problem hiding this comment.
Pull request overview
This PR updates the copyright-header normalization workflow to preserve the original/earliest year when an existing top-of-file header is present, and removes duplicate header blocks so each file ends up with exactly one canonical header.
Changes:
- Preserved the original (earliest) copyright year when normalizing an existing header.
- Collapsed duplicate top-of-file header blocks down to one canonical header.
- Updated the header-update agent prompt to document the year-preservation and de-duplication rules.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/Domain/Abstractions/Result.cs | Collapses duplicate header blocks and keeps the earliest year (2025) in the canonical header. |
| .github/prompts/copyright-header-update-prompt.md | Documents the updated normalization rules (preserve earliest year, collapse duplicates). |
| 5. Validate that the header is present, correctly formatted, and at the top of each file after editing. | ||
| 2. For each file, check for one or more existing header-like comment blocks at the very first line. | ||
| 3. If one or more header blocks exist, treat the entire leading header region as a single unit: preserve the original/earliest copyright year already present, normalize the metadata to the canonical format, and replace the region with exactly one header block. | ||
| 4. If no header exists, insert the new header at the very first line of the file, with every line C# line commented (start with `//`). When there is no existing year to preserve, use the file's creation year. |
| ## Plan | ||
|
|
||
| This plan details how to review and update copyright headers in C# files, supporting both single-file and solution-wide operations. It ensures every file has the correct header, updating or inserting as needed. | ||
| This plan details how to review and update copyright headers in C# files, supporting both single-file and solution-wide operations. It ensures every file has the correct header, preserves the original/earliest existing copyright year when normalizing an existing header, and collapses duplicate header blocks into one canonical header. |
Contributor
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #285 +/- ##
=======================================
Coverage 86.21% 86.21%
=======================================
Files 44 44
Lines 1103 1103
Branches 132 132
=======================================
Hits 951 951
Misses 100 100
Partials 52 52
🚀 New features to boost your workflow:
|
5 tasks
Owner
Author
mpaulosky
force-pushed
the
squad/284-normalize-copyright-header-updates
branch
from
May 10, 2026 22:49
d3beb06 to
b17768e
Compare
mpaulosky
enabled auto-merge (squash)
May 10, 2026 22:50
mpaulosky
pushed a commit
that referenced
this pull request
May 11, 2026
- Issue #286 (ci-failure) resolved: PRs #283, #285 merged with AppHost.Tests fix - Issue #287 triaged to squad:boromir; PR #288 awaiting CI re-run - Issues #289 (PR #290) and #276 (PR #277) ready for review; all tests passing - Board state: 3 open issues, 5 open PRs; final state documented Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.
Summary
Validation
dotnet build MyBlog.slnx --configuration Release --no-restoredotnet test tests/Architecture.Tests/Architecture.Tests.csproj --configuration Release --no-builddotnet test tests/Domain.Tests/Domain.Tests.csproj --configuration Release --no-builddotnet test tests/Web.Tests/Web.Tests.csproj --configuration Release --no-builddotnet test tests/Web.Tests.Bunit/Web.Tests.Bunit.csproj --configuration Release --no-builddotnet test tests/Web.Tests.Integration/Web.Tests.Integration.csproj --configuration Release --no-builddotnet test tests/AppHost.Tests/AppHost.Tests.csproj --configuration Release --no-buildCloses #284