Skip to content

feat(tool/cmd/migrate): extract copyright year from existing files#4596

Merged
julieqiu merged 1 commit intogoogleapis:mainfrom
julieqiu:nodejs-09-copyright-migrate
Mar 15, 2026
Merged

feat(tool/cmd/migrate): extract copyright year from existing files#4596
julieqiu merged 1 commit intogoogleapis:mainfrom
julieqiu:nodejs-09-copyright-migrate

Conversation

@julieqiu
Copy link
Copy Markdown
Member

@julieqiu julieqiu commented Mar 15, 2026

Read the copyright year from src/index.ts in each package and set it as copyright_year in the library config. This preserves the original copyright year when libraries are regenerated, since the generator always uses the current year.

For #4413

Read the copyright year from src/index.ts in each package and set it
as copyright_year in the library config. This preserves the original
copyright year when libraries are regenerated, since the generator
always uses the current year.
@julieqiu julieqiu requested a review from a team as a code owner March 15, 2026 18:02
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

The pull request adds functionality to extract the copyright year from existing Node.js package files to preserve it during regeneration. The implementation is straightforward and includes a corresponding test update. I've suggested an improvement to the regular expression to handle year ranges in copyright notices, making the extraction more robust.

Comment thread tool/cmd/migrate/nodejs.go
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 15, 2026

Codecov Report

❌ Patch coverage is 88.88889% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 79.40%. Comparing base (1eadeb4) to head (4ccb91f).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
tool/cmd/migrate/nodejs.go 88.88% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4596   +/-   ##
=======================================
  Coverage   79.39%   79.40%           
=======================================
  Files         110      110           
  Lines        9223     9232    +9     
=======================================
+ Hits         7323     7331    +8     
- Misses       1389     1390    +1     
  Partials      511      511           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@julieqiu julieqiu enabled auto-merge (squash) March 15, 2026 19:25
@julieqiu julieqiu merged commit 7036b07 into googleapis:main Mar 15, 2026
19 of 20 checks passed
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.

2 participants