Skip to content

Adds a new comment to PR with a summary of changes to dependencies in a PR including release notes and changelogs

License

Notifications You must be signed in to change notification settings

AurorNZ/report-updated-dependencies

Repository files navigation

report-updated-dependencies status

Report updated dependencies

This Github Actions runs on changes to PR requests to detect and report changes made to dependencies. Dependency lookups, change detections and fetching of release notes are all done by Renovate.

name: 'build-test'
on:
  pull_request:

jobs:
  report-updated-dependencies:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: AurorNZ/report-updated-dependencies@v1

Or run conditionally:

name: 'build-test'
on: # rebuild any PRs and main branch changes
  pull_request:
  push:
    branches:
      - main
      - 'releases/*'

jobs:
  report-updated-dependencies:
    if: ${{ github.event_name == 'pull_request' }}
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: AurorNZ/report-updated-dependencies@v1

Publish to a distribution branch

Actions are run from GitHub repositories, so we will check-in the packed dist folder.

Then run ncc and push the results:

$ npm run package
$ git add dist
$ git commit -a -m "prod dependencies"
$ git push origin releases/v1

Note We recommend you use the --license option when running the ncc command: this creates a license file for all of the production node modules used in your project.

Your action is now published! 🚀

See the versioning documentation.

Debugging

  • Create a pull request, ideally with commits that update dependencies
  • Once the test run is finished, enable debugging
  • Run the test again with debugging enabled
  • Take the JSON context from debug logs (after ReportUpdatedDependencies context that can be used for testing:) and save it as test-context.json into the root of this repository
  • Add the following code to .env file
    INPUT_TOKEN=<YOUR_GITHUB_TOKEN>
    
  • Use the F5 shortcut key in VSCode to start debugging

About

Adds a new comment to PR with a summary of changes to dependencies in a PR including release notes and changelogs

Resources

License

Stars

Watchers

Forks

Packages

No packages published