2019-12-15 13:28 — By Erik van Eykelen
This document attempts to describe how a changelog can be stored in JSON format. The reason for posting this specification is that I needed a public format for https://releasewise.com/, and I was unable to find anything on the web.
But first, what is a changelog? Keep A Changelog defines it as follows:
A changelog is a file which contains a curated, chronologically ordered list of notable changes for each version of a project.
I proposes the following structure:
{
"releases": [
{
"version": "",
"codename": "",
"released": "",
"changelog": [
{
"title": "",
"released": "",
"label": "",
"module": "",
"language": "",
"author": "",
"description_group": [
{
"media_type": "",
"body": ""
}
],
"urgency": "",
"url_group": [
{
"url": "",
"title": "",
"url_type": "",
"media_type": ""
}
]
}
]
}
]
}
Example of a typical changelog:
{
"releases": [
{
"version": "1.2.10",
"codename": "Big Electric Cat",
"released": "2019/03/30",
"changelog": [
{
"title": "Tasks can now be dragged between projects",
"released": "2019/03/28",
"label": "Added",
"module": "ui",
"language": "en",
"author": "David",
"description_group": [
{
"media_type": "text/plain",
"body": "Previously you had to cut a task and paste it into a project column in order to move tasks. With this change you can now drag and drop tasks between project columns."
}
],
"urgency": "low",
"url_group": [
{
"url": "https://example.com/assets/screenshot.jpg",
"title": "Dragging and dropping a task",
"url_type": "image",
"media_type": "image/jpeg"
}
]
}
]
}
]
}
releases[]
: array of { "version", "codename", "released", "changelog" }
elementsversion
: version number, preferably based on Semantic Versioning (required)codename
: code namereleased
: release date of version formatted as ISO 8601 date or Unreleased
changelog
: array of entries describing new features, bug fixes, etc
title
: short description of the feature, preferably less than 50 characters (required)released
: release date of change formatted as ISO 8601 date or Unreleased
label
: see below (required)module
: module name, useful for mono reposlanguage
: ISO 639-1 language codeauthor
: name of authordescription_group
: array of { "media_type", "body" }
elementsmedia_type
: allowed values are text/plain
, text/html
, text/markdown
body
: description of the changeurgency
: allowed values are low
, medium
, high
, critical
indicating importance of this changeurl_group
: array of { "url", "title", "url_type", "media_type" }
elementsurl
: link to web page, image, document, or other URL-addressable asset (required)title
: description of resource URL points tourl_type
: allowed values are web
, image
, video
, audio
, document
media_type
: media/MIME typelabel
The Keep A Changelog site recommends:
Added
for new featuresChanged
for changes in existing functionalityDeprecated
for soon-to-be removed featuresRemoved
for now removed featuresFixed
for any bug fixesSecurity
in case of vulnerabilitiesOther often used labels are:
Unreleased
Improved
Refactored
Performance
Enhancement
Feature
Other
This specification doesn't specify a required set of label
values. Although this would be preferable it seems there are too many variations out in the wild.