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.

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
signalMust be DEPENDENCY_DIFF
sticky-idRecommendedReuses the same comment on every push
enable-cveNofalseScans changed packages for known CVEs
max-depsNo50Maximum 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
signalMust be NEW_DEPENDENCY
sticky-idRecommendedReuses the same comment on every push
enable-cveNofalseScans new packages for known CVEs
max-depsNo25Maximum number of new dependencies to list

Using both together

Combine both signals in a single workflow to get the full picture — a diff of all package changes alongside a focused view of net-new additions:

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' - 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

Each signal posts to its own sticky comment and updates in place on every push.

Next steps

Last updated on