Skip to Content
PR CommentsUse CasesDependency Comments

Dependency Comments

Track package changes and spot new dependencies directly in your PRs — before they land in production.

Dev Herald provides two signals for dependency visibility:

SignalWhat it shows
DEPENDENCY_DIFFFull diff — additions, removals, and version bumps
NEW_DEPENDENCYOnly packages being introduced for the first time

Both optionally scan for known CVEs.

Both signals require fetch-depth: 0 on your checkout step so Dev Herald can compare against the base branch.

Keep a stable sticky-id on each of these comments. When a later push has no dependency changes, delete that sticky comment so reviewers are not left with the previous diff. See Removing a stale comment.

Dependency diff

Get a full diff of added, removed, and updated packages across every PR.

name: Dependency Diff on: pull_request: types: [opened, synchronize, reopened] jobs: dependency-diff: runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@v4 with: fetch-depth: 0 - name: Post dependency diff uses: dev-herald/comment@v1 with: api-key: ${{ secrets.DEV_HERALD_API_KEY }} pr-number: ${{ github.event.pull_request.number }} sticky-id: dependency-diff signal: 'DEPENDENCY_DIFF' enable-cve: 'true' max-deps: '50'

Options

OptionRequiredDefaultDescription
signal✅—Must be DEPENDENCY_DIFF
sticky-idRecommended—Reuses the same comment on every push
enable-cveNofalseScans changed packages for known CVEs
max-depsNo25Maximum number of dependency changes to list

New dependency signal

Surface only packages being introduced for the first time — great for keeping a close eye on supply chain additions without the noise of routine upgrades.

- name: Post New Dependency Signal uses: dev-herald/comment@v1 with: api-key: ${{ secrets.DEV_HERALD_API_KEY }} pr-number: ${{ github.event.pull_request.number }} signal: 'NEW_DEPENDENCY' enable-cve: 'true' max-deps: '25' sticky-id: new-deps

Options

OptionRequiredDefaultDescription
signal✅—Must be NEW_DEPENDENCY
sticky-idRecommended—Reuses the same comment on every push
enable-cveNofalseScans new packages for known CVEs
max-depsNo25Maximum number of new dependencies to list

Using both together

Post both signals as one comment. Save this as .github/workflows/dependency-signals.yml. enable-cve and max-deps apply to both sections. See Combined Signals for how the list works.

name: Dependency Signals on: pull_request: types: [opened, synchronize, reopened] jobs: dependency-signals: runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@v4 with: fetch-depth: 0 - name: Post dependency signals uses: dev-herald/comment@v1 with: api-key: ${{ secrets.DEV_HERALD_API_KEY }} pr-number: ${{ github.event.pull_request.number }} sticky-id: dependency-signals signals: | - DEPENDENCY_DIFF - NEW_DEPENDENCY enable-cve: 'true' max-deps: '50'

A section with no package changes is left out. If both are empty, nothing is posted.

Next steps

Last updated on