Generate licenses.json via GitHub Actions after dependency updates (#38) #43
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 of Changes:
Adds a workflow to generate
licenses.json
licenses.json
file wheneverpackage.json
orpnpm-lock.yaml
changes. Thelicenses.json
file contains license information for each dependency, along with details such as the repository URL, publisher, and other metadata provided by the package authors.Configures
PERSONAL_ACCESS_TOKEN
for secure commitsPERSONAL_ACCESS_TOKEN
to authorize GitHub Actions (github-actions[bot]
) to commit changes directly. This ensures license updates are committed securely and automatically.Updates
test-and-build
workflow triggertest-and-build
workflow runs on bothpush
andpull_request
events across all branches ("**"
). It guarantees the check will trigger after the license file is committed, making it the final validation step before merging.Bumps dependency version
Potential concern: This PR doesn’t allow us to verify if
github-actions[bot]
can still automatically merge pull requests whengithub-actions[bot]
is the last contributor. The current configuration might require the last commit to be made by Dependabot.Why it’s expected to work:
github-actions[bot]
withPERSONAL_ACCESS_TOKEN
, which should meet the required permissions.test-and-build
workflow now runs after commits from GitHub Actions, satisfying branch protection rules.We will be able to confirm this functionality fully when the next Dependabot PR invokes an automatic merge.
Closes #38