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}]}
}
Page
render turns a report into a Markdown page for a GitLab wiki, without calling GitLab:
uvx release-scope collect --group team/backend --output report.json --cache cache.json; \
uvx release-scope render report.json --output report.md
The page opens with a table of the services that have pending changes or problems, with the ref each environment runs; services already up to date collapse into one expandable table. Each service with changes then has a collapsible table of its rows: the tag linked to its pipeline, the merge requests or direct commit, Jira keys, where the change is deployed, and the failed jobs of its main-branch and tag pipelines.
Chain the two commands with ;, not &&: collect exits 1 when a service failed, which is exactly when the page
should show it. Alert on the exit code of collect, not on whether to render. render fails only when it cannot
read the report or write the page.
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.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| release_scope-0.2.0.tar.gz | 16.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| release_scope-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 37.4 kB
Release files / release_scope-0.2.0.tar.gz
| Download URL | release_scope-0.2.0.tar.gz |
|---|---|
| Size | 16.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
41101b8768ed73af10efdf208289b01543e2ceb5e33c8dadf182dcf7bcbb4e03
|
|
BLAKE2b-256 checksum How to use checksums |
b3b7e7fd19678daacd2d8b91c7340eded620c337b680280694f6c2db4bc549a9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.20 {"installer":{"name":"uv","version":"0.12.20","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.2.0-py3-none-any.whl
| Download URL | release_scope-0.2.0-py3-none-any.whl |
|---|---|
| Size | 20.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
61bb72a15df16cba1568f9ed65e8db09344ac88020deb6faa29f9b48dac9dc53
|
|
BLAKE2b-256 checksum How to use checksums |
f0bb3730892354f8fc624d896069b09532a3d84bb699be0cd86312af7cc446b4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.20 {"installer":{"name":"uv","version":"0.12.20","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}
|