Skip to content

Commit f50ac47

Browse files
authored
Refactor changelog
New changelog is at `docs/changelog.md` and uses the format defined at <https://keepachangelog.com/>. It only contins releases in the 3.x series. The old changelog at `docs/change_log/` remains in its old format as an archive and only contains older releases. The archive is removed from the site navigation and is only accessable from links in the new changelog. It is anticipated that only one major release (and its minor releases) will ever be in the new changelog at a time. Therefore, with the release of a future version 4.0, the 3.x changelog would be archived as well. Update the contributing guide to reflect the changes. Update the changelog validation workflow to use an action which understands the new format. Update deploy action to include release notes from changelog in a GitHub release.
1 parent 8ae73a0 commit f50ac47

17 files changed

+831
-811
lines changed

.github/workflows/changelog.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: changelog
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- '**'
7+
path:
8+
# Only run if changes were made in markdown/
9+
- 'markdown/**'
10+
11+
# permissions:
12+
# pull-requests: write
13+
14+
jobs:
15+
validate:
16+
17+
runs-on: ubuntu-latest
18+
steps:
19+
# - uses: actions/checkout@v2
20+
- uses: dangoslen/changelog-enforcer@v3
21+
with:
22+
changeLogPath: 'docs/changelog.md'
23+
missingUpdateErrorMessage: |
24+
@${{ github.actor }}, thank you for your contribution. It appears that you have not added a comment to the
25+
changelog describing the changes you have made. Doing so will help to ensure your contribution is accepted.
26+
27+
Please see the [Contributing Guide](https://python-markdown.github.io/contributing/#changelog) for details.

.github/workflows/deploy.yml

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,25 @@ jobs:
2727
with:
2828
user: __token__
2929
password: ${{ secrets.PYPI_PASSWORD }}
30+
- name: Get Changelog Entry
31+
if: success()
32+
id: changelog_reader
33+
uses: mindsers/changelog-reader-action@v2
34+
with:
35+
validation_level: warn
36+
version: ${{ github.ref_name }}
37+
path: ./docs/changelog.md
3038
- name: Release to GitHub
31-
if: success() && startsWith(github.ref, 'refs/tags/')
32-
uses: fnkr/github-action-ghr@v1
33-
env:
34-
GHR_PATH: dist/
35-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
39+
if: success()
40+
uses: ncipollo/release-action@v1
41+
with:
42+
tag: ${{ steps.changelog_reader.outputs.version }}
43+
name: Release ${{ steps.changelog_reader.outputs.version }}
44+
body: ${{ steps.changelog_reader.outputs.changes }}
45+
artifacts: dist/**
46+
prerelease: ${{ steps.changelog_reader.outputs.status == 'prereleased' }}
47+
draft: ${{ steps.changelog_reader.outputs.status == 'unreleased' }}
48+
allowUpdates: true
3649

3750
ghpages:
3851
runs-on: ubuntu-latest

.github/workflows/docs.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: docs
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- '**'
7+
# Only run when changes are made to the docs.
8+
paths:
9+
- 'docs/**'
10+
11+
jobs:
12+
markdown-link-check:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v2
16+
- uses: gaurav-nelson/github-action-markdown-link-check@v1
17+
with:
18+
use-quiet-mode: yes
19+
use-verbose-mode: yes
20+
check-modified-files-only: yes
21+
base-branch: master

.github/workflows/process.yml

Lines changed: 0 additions & 37 deletions
This file was deleted.

.spell-dict

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,10 @@ blockquotes
1818
boolean
1919
CamelCase
2020
Chodarev
21+
changelog
22+
changelogs
2123
CLI
24+
cPython
2225
CodeHilite
2326
codehilite
2427
Cogumbreiro
@@ -49,6 +52,7 @@ implementers
4952
InlineProcessor
5053
Jiryu
5154
JSON
55+
keepachangelog
5256
Kjell
5357
Krech
5458
kwargs

docs/change_log/index.md

Lines changed: 2 additions & 109 deletions
Original file line numberDiff line numberDiff line change
@@ -3,116 +3,9 @@ title: Change Log
33
Python-Markdown Change Log
44
=========================
55

6+
!!! note
67

7-
*under development*: version 3.5 ([Notes](release-3.5.md))
8-
9-
July 25, 2023: version 3.4.4 (a bug-fix release).
10-
11-
* Add a special case for initial `'s` to smarty extension (#1305).
12-
* Unescape any backslash escaped inline raw HTML (#1358).
13-
* Unescape backslash escaped TOC token names (#1360).
14-
15-
16-
March 23, 2023: version 3.4.3 (a bug-fix release).
17-
18-
* Restore console script (#1327).
19-
20-
March 22, 2023: version 3.4.2 (a bug-fix release).
21-
22-
* Improve standalone * and _ parsing (#1300).
23-
* Consider `<html>` HTML tag a block-level element (#1309).
24-
* Officially support Python 3.11.
25-
* Switch from `setup.py` to `pyproject.toml`.
26-
27-
July 15, 2022: version 3.4.1 (a bug-fix release).
28-
29-
* Fix an import issue with `importlib.util` (#1274).
30-
31-
July 15, 2022: version 3.4 ([Notes](release-3.4.md)).
32-
33-
May 5, 2022: version 3.3.7 (a bug-fix release).
34-
35-
* Disallow square brackets in reference link ids (#1209).
36-
* Retain configured `pygments_style` after first code block (#1240).
37-
* Ensure fenced code attributes are properly escaped (#1247).
38-
39-
Nov 17, 2021: version 3.3.6 (a bug-fix release).
40-
41-
* Fix a dependency issue (#1195, #1196).
42-
43-
Nov 16, 2021: version 3.3.5 (a bug-fix release).
44-
45-
* Make the `slugify_unicode` function not remove diacritical marks (#1118).
46-
* Fix `[toc]` detection when used with `nl2br` extension (#1160).
47-
* Re-use compiled regex for block level checks (#1169).
48-
* Don't process shebangs in fenced code blocks when using CodeHilite (#1156).
49-
* Improve email address validation for Automatic Links (#1165).
50-
* Ensure `<summary>` tags are parsed correctly (#1079).
51-
* Support Python 3.10 (#1124).
52-
53-
Feb 24, 2021: version 3.3.4 (a bug-fix release).
54-
55-
* Properly parse unclosed tags in code spans (#1066).
56-
* Properly parse processing instructions in md_in_html (#1070).
57-
* Properly parse code spans in md_in_html (#1069).
58-
* Preserve text immediately before an admonition (#1092).
59-
* Simplified regex for HTML placeholders (#928) addressing (#932).
60-
* Ensure `permalinks` and `anchorlinks` are not restricted by `toc_depth` (#1107).
61-
* Fix corner cases with lists under admonitions (#1102).
62-
63-
Oct 25, 2020: version 3.3.3 (a bug-fix release).
64-
65-
* Unify all block-level tags (#1047).
66-
* Fix issue where some empty elements would have text rendered as `None` when using `md_in_html` (#1049).
67-
* Avoid catastrophic backtracking in `hr` regex (#1055).
68-
* Fix `hr` HTML handling (#1053).
69-
70-
Oct 19, 2020: version 3.3.2 (a bug-fix release).
71-
72-
* Properly parse inline HTML in md_in_html (#1040 & #1045).
73-
* Avoid crashing when md_in_html fails (#1040).
74-
75-
Oct 12, 2020: version 3.3.1 (a bug-fix release).
76-
77-
* Correctly parse raw `script` and `style` tags (#1036).
78-
* Ensure consistent class handling by `fenced_code` and `codehilite` (#1032).
79-
80-
Oct 6, 2020: version 3.3 ([Notes](release-3.3.md)).
81-
82-
May 8, 2020: version 3.2.2 (a bug-fix release).
83-
84-
* Add `checklinks` tox environment to ensure all links in documentation are good.
85-
* Refactor extension API documentation (#729).
86-
* Load entry_points (for extensions) only once using `importlib.metadata`.
87-
* Do not double escape entities in TOC.
88-
* Correctly report if an extension raises a `TypeError` (#939).
89-
* Raise a `KeyError` when attempting to delete a nonexistent key from the
90-
extension registry (#939).
91-
* Remove import of `packaging` (or `pkg_resources` fallback) entirely.
92-
* Remove `setuptools` as a run-time dependency (`install_required`).
93-
94-
Feb 12, 2020: Released version 3.2.1 (a bug-fix release).
95-
96-
* The `name` property in `toc_tokens` from the TOC extension now
97-
escapes HTML special characters (`<`, `>`, and `&`).
98-
99-
Feb 7, 2020: Released version 3.2 ([Notes](release-3.2.md)).
100-
101-
May 20, 2019: Released version 3.1.1 (a bug-fix release).
102-
103-
* Fixed import failure in `setup.py` when the source directory is not
104-
on `sys.path` (#823).
105-
* Prefer public `packaging` module to pkg_resources' private copy of
106-
it (#825).
107-
108-
Mar 25, 2019: Released version 3.1 ([Notes](release-3.1.md)).
109-
110-
Sept 28, 2018: Released version 3.0.1 (a bug-fix release).
111-
112-
* Brought back the `version` and `version_info` variables (#709).
113-
* Added support for hexadecimal HTML entities (#712).
114-
115-
Sept 21, 2018: Released version 3.0 ([Notes](release-3.0.md)).
8+
This is an archive of the changelog prior to the release of version 3.0. See the [current changelog](../changelog.md) for up-to-date details.
1169

11710
Jan 4, 2018: Released version 2.6.11 (a bug-fix release). Added a new
11811
`BACKLINK-TITLE` option to the footnote extension so that non-English

0 commit comments

Comments
 (0)