Skip to content

fix: keep NOTICE.txt accurate in Renovate PRs and local dev (#252)#287

Merged
margaretjgu merged 1 commit into
mainfrom
fix/notice-renovate
May 11, 2026
Merged

fix: keep NOTICE.txt accurate in Renovate PRs and local dev (#252)#287
margaretjgu merged 1 commit into
mainfrom
fix/notice-renovate

Conversation

@margaretjgu
Copy link
Copy Markdown
Member

@margaretjgu margaretjgu commented May 11, 2026

Renovate PRs were failing the notice-file CI check because NOTICE.txt was not regenerated when dependencies changed.

Three-part fix:

  • renovate.json: add postUpgradeTasks so the Renovate bot runs node scripts/generate-notice.mjs after any dep update and includes the refreshed NOTICE.txt in the same PR commit.
  • .githooks/pre-commit: regenerate NOTICE.txt automatically whenever package.json or package-lock.json is staged during a local commit.
  • package.json prepare script: runs git config core.hooksPath .githooks after npm install so the hook is active without any manual setup.

closes #252

Renovate PRs were failing the notice-file CI check because NOTICE.txt
was not regenerated when dependencies changed.

Three-part fix:
- renovate.json: add postUpgradeTasks so the Renovate bot runs
  `node scripts/generate-notice.mjs` after any dep update and includes
  the refreshed NOTICE.txt in the same PR commit.
- .githooks/pre-commit: regenerate NOTICE.txt automatically whenever
  package.json or package-lock.json is staged during a local commit.
- package.json `prepare` script: runs `git config core.hooksPath .githooks`
  after `npm install` so the hook is active without any manual setup.
@github-actions
Copy link
Copy Markdown

MegaLinter analysis: Success

Descriptor Linter Files Fixed Errors Warnings Elapsed time
✅ BASH shellcheck 1 0 0 0.02s
✅ COPYPASTE jscpd yes no no 6.42s
✅ REPOSITORY gitleaks yes no no 94.89s
✅ REPOSITORY git_diff yes no no 1.05s
✅ REPOSITORY secretlint yes no no 18.11s
✅ REPOSITORY trivy yes no no 16.36s

See detailed reports in MegaLinter artifacts
Set VALIDATE_ALL_CODEBASE: true in mega-linter.yml to validate all sources, not only the diff

MegaLinter is graciously provided by OX Security
Show us your support by starring ⭐ the repository

Copy link
Copy Markdown
Member

@JoshMock JoshMock left a comment

Choose a reason for hiding this comment

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

LGTM. I noticed this and logged it in #252 so please close on merge. 🙏

@margaretjgu margaretjgu merged commit 362497f into main May 11, 2026
17 of 18 checks passed
@margaretjgu margaretjgu deleted the fix/notice-renovate branch May 11, 2026 16:01
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.

Renovate PRs must include corrections to NOTICE.txt

2 participants