Skip to main content

depdelta-cli

DepDelta for CI on Gerrit and GitLab: the GitHub App's dependency review, posted on the change.

On every change that touches a manifest or lockfile, depdelta:

  1. sends the changed manifests and lockfiles (both ends) to DepDelta. Source code is never sent;
  2. gets back each update's verdict and, for npm and Maven, the declarations it removes or changes;
  3. looks for those declarations in the checkout, and sends only the hits (path, line, symbol);
  4. posts the review: a Gerrit change message (no vote), or one GitLab merge request note that later pipelines edit in place.

Nine ecosystems: npm, PyPI, Maven, Composer, Cargo, RubyGems, pub.dev, NuGet and Go. Needs Python 3.11+ and git, nothing else.

docker pull ghcr.io/mbobiosio/depdelta-cli:latest
# or
pip install depdelta-cli

API key

Make one in DepDelta → Settings → API keys for CI, and store it in your CI's secrets as DEPDELTA_API_KEY. Each key gets 240 reviews an hour, waiting on release notes included.

Jenkins with Gerrit Trigger

The job runs on patchset-created. Gerrit Trigger sets GERRIT_PROJECT, GERRIT_CHANGE_NUMBER, GERRIT_PATCHSET_REVISION and GERRIT_CHANGE_URL. The review is posted with a Gerrit account's HTTP password: a service account works best.

The checkout needs the patch set's parent: don't clone with depth 1 (or let depdelta fetch it; it does when the parent is missing).

pipeline {
  agent { docker { image 'ghcr.io/mbobiosio/depdelta-cli:latest' } }
  stages {
    stage('DepDelta') {
      steps {
        withCredentials([
          string(credentialsId: 'depdelta-api-key', variable: 'DEPDELTA_API_KEY'),
          usernamePassword(credentialsId: 'gerrit-http',
                           usernameVariable: 'GERRIT_HTTP_USER',
                           passwordVariable: 'GERRIT_HTTP_PASSWORD'),
        ]) {
          // A DepDelta outage shouldn't fail the build.
          catchError(buildResult: 'SUCCESS', stageResult: 'UNSTABLE') {
            sh 'depdelta'
          }
        }
      }
    }
  }
}

Without Docker: pip install depdelta-cli on the agent, then the same sh 'depdelta'.

DEPDELTA_GERRIT_URL overrides Gerrit's address when GERRIT_CHANGE_URL isn't the REST root (a proxy, a different host name for agents).

Messages carry the tag autogenerated:depdelta, so Gerrit folds older patch sets' reviews away, and notify only the change owner.

GitLab CI

Runs in merge request pipelines. CI_JOB_TOKEN can't write notes: give the job a project access token with the api scope (Reporter role is enough) as GITLAB_TOKEN.

depdelta:
  image: ghcr.io/mbobiosio/depdelta-cli:latest
  rules:
    - if: $CI_PIPELINE_SOURCE == "merge_request_event"
      changes:
        - "**/package.json"
        - "**/package-lock.json"
        - "**/pom.xml"
        - "**/requirements*.txt"
        - "**/pyproject.toml"
        - "**/*.lock"
        - "**/go.mod"
  variables:
    GIT_DEPTH: 0
  script:
    - depdelta
  allow_failure: true

Uses link to the files at the merge request's head commit.

Options

depdelta [--repo .] [--base REV --head REV] [--print]
         [--format markdown|text] [--wait 300]
         [--fail-on never|breaking|review|unknown|safe]
         [--api-url URL]
  • --print prints the review instead of posting it. With --base and --head (outside CI) it always prints: depdelta --base origin/main --head HEAD.
  • --wait is how long to wait for DepDelta to read release notes it hasn't seen yet. After that the review posts as it stands, saying what is still being read.
  • --fail-on breaking exits 1 when an update is breaking, to fail the job.

Exit status: 0 posted (or nothing to review), 1 the --fail-on verdict was met, 2 it couldn't review or post.

Privacy

Only the changed manifests and lockfiles leave CI, plus, for updates with removed or changed APIs, the path, line and symbol of each use found. The source code stays in CI. Gerrit and GitLab credentials are sent only to your Gerrit or GitLab.

Development

uv sync
make check format test

src/depdelta_cli/usage.py is copied from depdelta-api (app/updates/utils/usage.py), and manifests.py follows its manifest names: change them there first, then here.

Releases: bump version in pyproject.toml, then tag v<version> and push the tag. GitHub Actions publishes to PyPI and GHCR.

License

MIT

Metadata

Release files for depdelta-cli 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for depdelta-cli 0.1.0
File Size Uploaded Provenance Actions
depdelta_cli-0.1.0.tar.gz 47.0 kB With provenance Details for depdelta_cli-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for depdelta-cli 0.1.0
File Interpreter ABI Platform Actions
depdelta_cli-0.1.0-py3-none-any.whl Python 3 none any Details for depdelta_cli-0.1.0-py3-none-any.whl

Total release size: 69.6 kB

Release files / depdelta_cli-0.1.0.tar.gz

Download URL depdelta_cli-0.1.0.tar.gz
Size 47.0 kB
Tags Source
SHA-256 checksum
How to use checksums
0c2fbf82c72af4a34e76e9f88e872343d4ae041c73dc02dd539582a22dc14f2a
BLAKE2b-256 checksum
How to use checksums
aedadfd0022b95cb681f4224ad7b89ac51a17cd58b2fd69cec30c34600193ff5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 25, 2026.

Transparency log

Release files / depdelta_cli-0.1.0-py3-none-any.whl

Download URL depdelta_cli-0.1.0-py3-none-any.whl
Size 22.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1ff3886b7edb3ea2c729da684b32bedc5aa33de7e3e0afc3db2ccb10881d51fe
BLAKE2b-256 checksum
How to use checksums
91f31509998db2a5f6db16109ff8851bafec7a6d4e89d43f72bfe72be56a4aff
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 25, 2026.

Transparency log

Security for depdelta-cli 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for depdelta_cli-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 25, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page