Read release notes from the default branch; changelog (1.4.1)

Notes still only attach to tagged versions, so they can be written ahead of a
release or corrected afterwards without tagging a new version.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-28 09:25:10 +02:00
co-authored by Claude Opus 5.5
parent 48d76d1b71
commit 633813c50d
8 changed files with 23 additions and 15 deletions
+8
View File
@@ -5,6 +5,14 @@ versions follow [Semantic Versioning](https://semver.org/).
## [Unreleased]
## [1.4.1] - 2026-10-28
### Changed
- **Release notes are read from the default branch** (`main`), not from the newest tag. Notes still
only show for tagged versions, so a section written ahead of a release stays hidden until it's
tagged — and notes for versions already out can be added or corrected without a new release.
## [1.4.0] - 2026-10-28
### Added
+2 -2
View File
@@ -42,8 +42,8 @@ and `HUB_PUBLIC_KEY` (the public key shown in Hub → Settings) in Cross Events'
## Releases and notices
- **Releases** come from git: every `v1.2.3` tag of `joshua/hope-events` is a release, the newest is
the latest version, and the notes churches see come from `WHATS-NEW.md` in that repo as of the
newest tag. The Hub checks every 15 minutes (and on **Sync now**, Releases page). So releasing
the latest version, and the notes churches see come from `WHATS-NEW.md` on that repo's default branch (only for
tagged versions, so notes can be written ahead or corrected later). The Hub checks every 15 minutes (and on **Sync now**, Releases page). So releasing
Cross Events is: write the version's section in `WHATS-NEW.md`, tag, push — installs see the
update with their next heartbeat.
- **Notices** (Notices page) are banners on churches' sites for their admins and supervisors, emails
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "events-hub-backend",
"version": "1.4.0",
"version": "1.4.1",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "events-hub-backend",
"version": "1.4.0",
"version": "1.4.1",
"hasInstallScript": true,
"dependencies": {
"@prisma/adapter-pg": "^7.10.1",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "events-hub-backend",
"version": "1.4.0",
"version": "1.4.1",
"private": true,
"description": "Cross Events Hub — API for managing Cross Events installs, licences and heartbeats",
"main": "src/index.js",
+6 -6
View File
@@ -1,12 +1,13 @@
/**
* Releases from git (Gitea): every v1.2.3 tag of the Cross Events repo is a release, dated by its
* commit, and the notes come from the repo's WHATS-NEW.md as of the newest tag ("## 1.2.3" sections;
* "urgent" or "security" in the heading marks an urgent release). Runs every 15 minutes and from
* commit, and the notes come from the repo's WHATS-NEW.md on its default branch ("## 1.2.3" sections;
* "urgent" or "security" in the heading marks an urgent release). Notes only attach to tagged
* versions, so a section written ahead of a release stays hidden until it's tagged, and a note can be
* corrected after release without a new version. Runs every 15 minutes and from
* "Sync now" on the Releases page, when a repo is set; git is then the only source of releases.
*/
const prisma = require('../config/db');
const { compareVersions } = require('./alerts');
const { getSettings, setSettings, releaseRepoToken } = require('./settings');
const { syncLatestVersion } = require('./releases');
@@ -111,9 +112,8 @@ async function syncReleases() {
const token = await releaseRepoToken();
const tags = await fetchTags(repo, token);
if (!tags.length) throw new Error('The repository has no version tags (v1.2.3) yet.');
const newest = tags.reduce((a, b) => (compareVersions(b.version, a.version) > 0 ? b : a));
const path = (settings.release_notes_path || 'WHATS-NEW.md').replace(/^\/+/, '').split('/').map(encodeURIComponent).join('/');
const markdown = await get(`${repo.api}/raw/${path}?ref=v${newest.version}`, token, { raw: true });
const markdown = await get(`${repo.api}/raw/${path}`, token, { raw: true });
const notes = parseNotes(markdown || '');
const existing = new Map((await prisma.release.findMany()).map(r => [r.version, r]));
@@ -138,7 +138,7 @@ async function syncReleases() {
const gone = [...existing.values()].filter(r => !tagged.has(r.version)).map(r => r.id);
if (gone.length) await prisma.release.deleteMany({ where: { id: { in: gone } } });
const latest = await syncLatestVersion();
await setSettings({ release_synced_at: new Date().toISOString(), release_sync_error: markdown === null ? `${settings.release_notes_path} was not found at v${newest.version}, so there are no notes.` : '' });
await setSettings({ release_synced_at: new Date().toISOString(), release_sync_error: markdown === null ? `${settings.release_notes_path} was not found on the default branch, so there are no notes.` : '' });
return { tags: tags.length, added, updated, removed: gone.length, latest };
} catch (e) {
await setSettings({ release_sync_error: `${new Date().toISOString()} ${e.message}`.slice(0, 500) });
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "events-hub-frontend",
"version": "1.4.0",
"version": "1.4.1",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "events-hub-frontend",
"version": "1.4.0",
"version": "1.4.1",
"dependencies": {
"lucide-react": "^0.536.0",
"next": "^15.5.24",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "events-hub-frontend",
"version": "1.4.0",
"version": "1.4.1",
"private": true,
"scripts": {
"dev": "next dev -p 3200",
+1 -1
View File
@@ -85,7 +85,7 @@ function GitSource({ source, onSaved, setMsg }: { source: Source; onSaved: () =>
</button>
)}
</div>
<p className="text-sm text-slate-600">Every <code>v1.2.3</code> tag is a release, and the newest tag is the latest version. The notes come from the file below as of that tag: a <code>## 1.2.3</code> heading per version, with <code>urgent</code> or <code>security</code> in the heading for an urgent release. Checked every 15 minutes. Leave the address blank to add releases by hand.</p>
<p className="text-sm text-slate-600">Every <code>v1.2.3</code> tag is a release, and the newest tag is the latest version. The notes come from the file below on the default branch, for tagged versions only (so they can be written ahead, or corrected later): a <code>## 1.2.3</code> heading per version, with <code>urgent</code> or <code>security</code> in the heading for an urgent release. Checked every 15 minutes. Leave the address blank to add releases by hand.</p>
<div className="grid gap-3 sm:grid-cols-3">
<div className="sm:col-span-2"><label className="label" htmlFor="repo_url">Repository</label><input id="repo_url" className="input" placeholder="https://c-git.crosscode.co.za/joshua/hope-events" value={form.url} onChange={e => setForm({ ...form, url: e.target.value })} /></div>
<div><label className="label" htmlFor="notes_path">Notes file</label><input id="notes_path" className="input" value={form.path} onChange={e => setForm({ ...form, path: e.target.value })} /></div>