Skip to main content

PyPI version Supported Python versions Coverage CI License

release-scope collects what sits between production and the default branch across GitLab services: tags, MRs, Jira keys, failed jobs.

For every service it reads the latest successful production deployment, walks the default branch down to that commit, and writes one JSON report: a row per merge request or direct commit, newest first, with the tags that point into it, the environments running it, the Jira keys its MR mentions, and the failed jobs of its main-branch and tag pipelines.

Quickstart

export RELEASE_SCOPE_GITLAB__ENDPOINT=https://gitlab.example.com
export RELEASE_SCOPE_GITLAB__TOKEN=glpat-...          # read_api scope
export RELEASE_SCOPE_ENVIRONMENTS='["prod", "preview"]'
export RELEASE_SCOPE_PRODUCTION_ENVIRONMENT=prod

uvx release-scope collect --group team/backend --output report.json --cache cache.json

--group and --project are repeatable and can be mixed. The command exits 1 when any service failed to collect; the report is still written and names the error on that service. A service GitLab denies access to fails alone, and its error lists the project settings and member page to check. A project with CI/CD or Environments disabled is reported with a warning and no rows, without querying it. Only a rejected token, or a group or project passed on the command line that the token cannot see, stops the run.

Configuration

Every setting is an environment variable; nothing about a GitLab or Jira instance is built in.

Variable Default Meaning
RELEASE_SCOPE_GITLAB__ENDPOINT https://gitlab.com GitLab base URL
RELEASE_SCOPE_GITLAB__TOKEN or GITLAB_TOKEN required Token with read_api
RELEASE_SCOPE_ENVIRONMENTS ["production"] Environments shown per service, as a JSON list
RELEASE_SCOPE_PRODUCTION_ENVIRONMENT production Environment whose deployed commit starts the range
RELEASE_SCOPE_JIRA_ENDPOINT unset When set, Jira keys link to <endpoint>/browse/<KEY>
RELEASE_SCOPE_JIRA_PROJECT_KEYS [] Keep only keys of these Jira projects; empty keeps all
RELEASE_SCOPE_MAX_COMMITS 1000 Stop walking a service's range after this many commits
RELEASE_SCOPE_REQUEST_TIMEOUT 10 Per-request timeout in seconds

Report

The report is versioned by schema_version; the models live in release_scope/_report.py. One row, trimmed:

{
  "kind": "merge_request",
  "tags": [{"name": "1.2.0", "url": "...", "pipeline": {"id": 201, "status": "success", "failed_jobs": []}}],
  "merge_requests": [{"iid": 12, "title": "SHOP-12 new endpoint", "url": "..."}],
  "commits": [{"sha": "c3...", "title": "Merge branch 'feature/SHOP-12'"}],
  "jira_keys": [{"key": "SHOP-12", "url": "https://jira.example.com/browse/SHOP-12"}],
  "environments": ["preview"],
  "main_pipeline": {"id": 103, "status": "failed", "failed_jobs": [{"kind": "job", "name": "lint", "allow_failure": false}]}
}

Cache

--cache names a JSON file that is read if present and rewritten atomically after the run. It holds only facts that do not change once settled: which merge requests a commit belongs to, and the failed jobs of a finished pipeline keyed by its updated_at, so a retried job invalidates the entry. Entries the run did not use are dropped. A missing, corrupt, or older-schema cache is ignored with a warning; the cache only saves requests and never changes the report.

Release files for release-scope 0.1.1

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

Source distribution (sdist)

Source distribution for release-scope 0.1.1
File Size Uploaded
release_scope-0.1.1.tar.gz 13.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for release-scope 0.1.1
File Interpreter ABI Platform
release_scope-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 30.8 kB

Release files / release_scope-0.1.1.tar.gz

Download URL release_scope-0.1.1.tar.gz
Size 13.3 kB
Tags Source
SHA-256 checksum
How to use checksums
1a8f6e0c3849ea1be6a60911b4df8c011981a752e8cee52d94fa46b95ad671c1
BLAKE2b-256 checksum
How to use checksums
1d45e3ea90e0f6d92c60a8b68c9c2528f8d9dbddd7ad63347ad942f738b73246
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.19 {"installer":{"name":"uv","version":"0.12.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / release_scope-0.1.1-py3-none-any.whl

Download URL release_scope-0.1.1-py3-none-any.whl
Size 17.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0acc8c4a75045a51356cd6c2c493768f4c8ec3c58601b4a3c3f5f5e3074615ef
BLAKE2b-256 checksum
How to use checksums
9887f0575b3b057d071bd943ec842449bfed6a1cb2197bf15e424d039ed0a481
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.19 {"installer":{"name":"uv","version":"0.12.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

0.3.0

2 release files

0.2.0

2 release files

This release

0.1.1 This release

2 release files

0.1.0

2 release files

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