Summary
Document the current SEMREL_PLUGIN_* configuration schema for this plugin with a formal version number, and implement a migration guide (and tooling where applicable) so users can safely upgrade when the schema changes.
Background
As part of the semrel-wide config migration initiative (SemRels/semrel#195), every plugin needs to:
- Declare a schema version for its
SEMREL_PLUGIN_* env-var contract
- Publish a JSON Schema to the semrel registry (SemRels/semrel-registry#11) so editors can validate plugin config inline
- Document breaking changes with a migration guide in
CHANGELOG.md and the README whenever env-var names change, new required vars are added, or semantics change
- Provide a migration snippet (or
semrel migrate hook) for each breaking change
Tasks
Example schema (JSON Schema draft 2020-12)
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://registry.semrel.io/schemas/plugins/updater-python/v1.json",
"title": "updater-python plugin configuration",
"type": "object",
"properties": {
"SEMREL_PLUGIN_EXAMPLE_VAR": {
"type": "string",
"description": "Example variable — replace with actual vars for this plugin.",
"default": ""
}
}
}
Acceptance criteria
Summary
Document the current
SEMREL_PLUGIN_*configuration schema for this plugin with a formal version number, and implement a migration guide (and tooling where applicable) so users can safely upgrade when the schema changes.Background
As part of the semrel-wide config migration initiative (SemRels/semrel#195), every plugin needs to:
SEMREL_PLUGIN_*env-var contractCHANGELOG.mdand the README whenever env-var names change, new required vars are added, or semantics changesemrel migratehook) for each breaking changeTasks
SEMREL_PLUGIN_*env vars and their types / defaults — this is schema v1PLUGIN_SCHEMA_VERSION=1to the plugin binary output (stdout structured field or log line) so semrel core can detect mismatchesCHANGELOG.mdExample schema (JSON Schema draft 2020-12)
{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://registry.semrel.io/schemas/plugins/updater-python/v1.json", "title": "updater-python plugin configuration", "type": "object", "properties": { "SEMREL_PLUGIN_EXAMPLE_VAR": { "type": "string", "description": "Example variable — replace with actual vars for this plugin.", "default": "" } } }Acceptance criteria
$schemaURL example for editor support