Replace Node.js license generation with Python script using live API queries #7446
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.
The existing Node.js scripts used hardcoded license mappings and couldn't dynamically fetch GitHub repository URLs for dependencies. This made maintenance difficult and resulted in many packages having placeholder "See package" licenses.
Changes
New Python script (
generate-licenses.py)yarn.lockfor npm packages and runsdotnet list packagefor NuGet packagesraw.githubusercontent.comLICENSE URLs from GitHub repositoriesEnhanced C# LicensesController
/LICENSE), then falls back to/LICENSE.txtand/LICENSE.mdif 404 is returnedUpdated documentation
LICENSE_GENERATION_README.mdnow documents Python script usage and API querying approachrequirements.txtwithrequestsdependency.gitignorefor Python cache filesRegenerated
licenses.jsonUsage
cd eform-client pip install -r requirements.txt python3 generate-licenses.pyThe enhanced C# controller automatically handles license filename variations without requiring changes to the Angular component.
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.