Skip to content

Commit 721da6e

Browse files
authored
fix(release): widen dispatch branch + tag patterns for test mode (#700)
The conductor in openemr/openemr#12061 widened the dispatch payload `branch` pattern to `^rel-[A-Za-z0-9]+$` so a sandbox branch like `rel-test` can drive end-to-end testing without a real release-cut. openemr/openemr#12063 then widened the `tag` pattern to allow an optional `-test.{shortSha}` suffix that the conductor produces when a test-mode prep PR merges (e.g. `v8_1_2-test.419858f`). Both widenings landed in the `openemr/openemr` vendored copy of `dispatch.schema.json` but never propagated to the canonical schema here, which is what `website-openemr` (and eventually `website-openemr-files`) re-vendor. Result: every `repository_dispatch` this session sent to `website-openemr`'s `release-docs` consumer failed schema validation on `/data/branch` and `/data/tag`. Bringing the canonical schema in line; adds a `good-tag-test.json` fixture covering the new shape. The companion vendored-copy update lands in `openemr/website-openemr`. Refs #664. Follow-up to openemr/openemr#12061 / openemr/openemr#12063.
1 parent 01240ef commit 721da6e

3 files changed

Lines changed: 17 additions & 4 deletions

File tree

tools/release/contracts/dispatch.schema.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,14 +74,14 @@
7474
"pattern": "^\\d+\\.\\d+\\.\\d+$"
7575
},
7676
"branch": {
77-
"description": "Release branch name. Per #664 spec: rel-<MAJOR><MINOR>0.",
77+
"description": "Release branch name. Per #664 spec real releases use rel-<MAJOR><MINOR>0 (e.g. rel-810). Pattern is widened to rel-<alphanumeric> so test branches like rel-test can exercise the same workflow end-to-end without a real release-cut.",
7878
"type": "string",
79-
"pattern": "^rel-\\d+\\d0$"
79+
"pattern": "^rel-[A-Za-z0-9]+$"
8080
},
8181
"tag": {
82-
"description": "Release tag name. Per #664 spec: v<MAJOR>_<MINOR>_<PATCH>.",
82+
"description": "Release tag name. Per #664 spec real releases use v<MAJOR>_<MINOR>_<PATCH>. Test runs append -test.<shortSha> (7 hex chars) so a test merge does not collide with a real release tag.",
8383
"type": "string",
84-
"pattern": "^v\\d+_\\d+_\\d+$"
84+
"pattern": "^v\\d+_\\d+_\\d+(-test\\.[0-9a-f]{7})?$"
8585
},
8686
"relCutData": {
8787
"type": "object",

tools/release/tests/Contracts/DispatchSchemaTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ public static function goodFixtures(): iterable
2929
yield 'openemr-rel-cut' => ['good-rel-cut.json'];
3030
yield 'openemr-rel-update' => ['good-rel-update.json'];
3131
yield 'openemr-tag' => ['good-tag.json'];
32+
yield 'openemr-tag (test)' => ['good-tag-test.json'];
3233
yield 'openemr-docs-binaries' => ['good-docs-binaries.json'];
3334
}
3435

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"event": "openemr-tag",
3+
"repo": "openemr/openemr",
4+
"sha": "abcdef0123456789abcdef0123456789abcdef01",
5+
"actor": "openemr-release-bot",
6+
"dispatched_at": "2026-04-29T12:30:00Z",
7+
"data": {
8+
"tag": "v8_1_0-test.abcdef0",
9+
"branch": "rel-test",
10+
"version": "8.1.0"
11+
}
12+
}

0 commit comments

Comments
 (0)