From 4a03e32882c7ce2a8f5deae704c95e512fdc20ef Mon Sep 17 00:00:00 2001 From: Ionut Filip Date: Thu, 14 Feb 2019 15:48:21 +0200 Subject: [PATCH 1/7] Towncrieri implementation --- towncrier/pyproject.toml | 9 +++++++++ towncrier/template.md | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 towncrier/pyproject.toml create mode 100644 towncrier/template.md diff --git a/towncrier/pyproject.toml b/towncrier/pyproject.toml new file mode 100644 index 00000000..2e966cc0 --- /dev/null +++ b/towncrier/pyproject.toml @@ -0,0 +1,9 @@ +[tool.towncrier] + #package = "mypackage" + #package_dir = "src" + filename = "CHANGELOG.md" + underlines = ["-", "", ""] + template = "template.md" + title_format = "v{version} - {project_date}" + issue_format = "[#{issue}](https://github.com/Mailu/Mailu/issues/{issue})" + start_string = "upgrading Freposte.io as some changes will include useful notes.\n" diff --git a/towncrier/template.md b/towncrier/template.md new file mode 100644 index 00000000..07ccb4f6 --- /dev/null +++ b/towncrier/template.md @@ -0,0 +1,32 @@ +{% for section, _ in sections.items() %} +{% set underline = underlines[0] %}{% if section %}{{section}} +{{ underline * section|length }}{% set underline = underlines[1] %} + +{% endif %} + +{% if sections[section] %} +{% for category, val in definitions.items() if category in sections[section]%} +{{ definitions[category]['name'] }} +{{ underline * definitions[category]['name']|length }} +{% if definitions[category]['showcontent'] %} +{% for text, values in sections[section][category].items() %} +- {{ text }} ({{ values|join(', ') }}) +{% endfor %} + +{% else %} +- {{ sections[section][category]['']|join(', ') }} + +{% endif %} +{% if sections[section][category]|length == 0 %} +No significant changes. + +{% else %} +{% endif %} + +{% endfor %} +{% else %} +No significant changes. + + +{% endif %} +{% endfor %} \ No newline at end of file From e548c4e531a9e465647ace70787a540b3d4e050c Mon Sep 17 00:00:00 2001 From: Ionut Filip Date: Thu, 14 Feb 2019 16:33:45 +0200 Subject: [PATCH 2/7] Moved towncrier to project root --- CHANGELOG.md | 2 ++ towncrier/pyproject.toml => pyproject.toml | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) rename towncrier/pyproject.toml => pyproject.toml (62%) diff --git a/CHANGELOG.md b/CHANGELOG.md index 13c5a25f..f66826ea 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ Notable changes to this project are documented in the current file. For more details about individual changes, see the Git log. You should read this before upgrading Freposte.io as some changes will include useful notes. + + v1.6.1 - unreleased ------------------- - Enhancement: Make Unbound drop privileges after binding to port diff --git a/towncrier/pyproject.toml b/pyproject.toml similarity index 62% rename from towncrier/pyproject.toml rename to pyproject.toml index 2e966cc0..17d66169 100644 --- a/towncrier/pyproject.toml +++ b/pyproject.toml @@ -1,9 +1,9 @@ [tool.towncrier] #package = "mypackage" - #package_dir = "src" + package_dir = "towncrier" filename = "CHANGELOG.md" underlines = ["-", "", ""] - template = "template.md" + template = "towncrier/template.md" title_format = "v{version} - {project_date}" issue_format = "[#{issue}](https://github.com/Mailu/Mailu/issues/{issue})" - start_string = "upgrading Freposte.io as some changes will include useful notes.\n" + start_string = "" From e674a6fe3d7ed08d6ee830a9eeea8be5ec43a31a Mon Sep 17 00:00:00 2001 From: Ionut Filip Date: Thu, 14 Feb 2019 17:18:10 +0200 Subject: [PATCH 3/7] Added docs for new changelog entries --- docs/contributors/guide.rst | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/docs/contributors/guide.rst b/docs/contributors/guide.rst index a3b6d95a..4b9820b7 100644 --- a/docs/contributors/guide.rst +++ b/docs/contributors/guide.rst @@ -69,6 +69,24 @@ After some testing on master, we will approve and merge this new PR as well. At the end of every milestone, a new stable branch will be created from ``master`` or any previous commit that matches the completion of the milestone. +CHANGELOG +````````` + +Adding entries in the CHANGELOG is an automated process which requires creation of a file under +``towncrier/newsfragments`` directory. + +The start of the filename is the ticket number, and the content is what will end up in the news file. +For example, if ticket #850 is about adding a new widget, the filename would be towncrier/newsfragments/850.feature +and the content would be ``Feature that has just been added``. + +Supported file extensions are: + +- .feature: Signifying a new feature. +- .bugfix: Signifying a bug fix. +- .doc: Signifying a documentation improvement. +- .removal: Signifying a deprecation or removal of public API. +- .misc: A ticket has been closed, but it is not of interest to users. + Forked projects --------------- From 8489bcb05e871252705b73c77f169716d2d98be9 Mon Sep 17 00:00:00 2001 From: Ionut Filip Date: Thu, 14 Feb 2019 17:24:12 +0200 Subject: [PATCH 4/7] Minor changes to changelog doc --- docs/contributors/guide.rst | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/contributors/guide.rst b/docs/contributors/guide.rst index 4b9820b7..0ae15c03 100644 --- a/docs/contributors/guide.rst +++ b/docs/contributors/guide.rst @@ -76,16 +76,16 @@ Adding entries in the CHANGELOG is an automated process which requires creation ``towncrier/newsfragments`` directory. The start of the filename is the ticket number, and the content is what will end up in the news file. -For example, if ticket #850 is about adding a new widget, the filename would be towncrier/newsfragments/850.feature +For example, if ticket ``#850`` is about adding a new widget, the filename would be towncrier/newsfragments/850.feature and the content would be ``Feature that has just been added``. Supported file extensions are: -- .feature: Signifying a new feature. -- .bugfix: Signifying a bug fix. -- .doc: Signifying a documentation improvement. -- .removal: Signifying a deprecation or removal of public API. -- .misc: A ticket has been closed, but it is not of interest to users. +- ``.feature``: Signifying a new feature. +- ``.bugfix``: Signifying a bug fix. +- ``.doc``: Signifying a documentation improvement. +- ``.removal``: Signifying a deprecation or removal of public API. +- ``.misc``: A ticket has been closed, but it is not of interest to users. Forked projects --------------- From 72b94d28f77203fe718d875ade3ebe074befbdd9 Mon Sep 17 00:00:00 2001 From: Ionut Filip Date: Thu, 14 Feb 2019 17:53:34 +0200 Subject: [PATCH 5/7] Modified PR template --- PULL_REQUEST_TEMPLATE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PULL_REQUEST_TEMPLATE.md b/PULL_REQUEST_TEMPLATE.md index 856fa5a0..a5315d30 100644 --- a/PULL_REQUEST_TEMPLATE.md +++ b/PULL_REQUEST_TEMPLATE.md @@ -13,4 +13,4 @@ Before we can consider review and merge, please make sure the following list is If an entry in not applicable, you can check it or remove it from the list. - [ ] In case of feature or enhancement: documentation updated accordingly -- [ ] Unless it's docs or a minor change: place entry in the [changelog](CHANGELOG.md), under the latest un-released version. +- [ ] Unless it's docs or a minor change: add changelog entry file. From e9cce18ffe1c542ed80dfc09d259901ae854e7de Mon Sep 17 00:00:00 2001 From: Ionut Filip Date: Mon, 18 Feb 2019 10:50:02 +0200 Subject: [PATCH 6/7] Add changelog link to docs --- PULL_REQUEST_TEMPLATE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PULL_REQUEST_TEMPLATE.md b/PULL_REQUEST_TEMPLATE.md index a5315d30..64afc4a1 100644 --- a/PULL_REQUEST_TEMPLATE.md +++ b/PULL_REQUEST_TEMPLATE.md @@ -13,4 +13,4 @@ Before we can consider review and merge, please make sure the following list is If an entry in not applicable, you can check it or remove it from the list. - [ ] In case of feature or enhancement: documentation updated accordingly -- [ ] Unless it's docs or a minor change: add changelog entry file. +- [ ] Unless it's docs or a minor change: add [changelog](https://mailu.io/1.6/contributors/guide.html#changelog) entry file. From fbc323035b4eb5962e0efcf2c04a495011c30995 Mon Sep 17 00:00:00 2001 From: Ionut Filip Date: Wed, 20 Feb 2019 12:10:54 +0200 Subject: [PATCH 7/7] Changed docs version from 1.6 to master --- PULL_REQUEST_TEMPLATE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PULL_REQUEST_TEMPLATE.md b/PULL_REQUEST_TEMPLATE.md index 64afc4a1..059318fc 100644 --- a/PULL_REQUEST_TEMPLATE.md +++ b/PULL_REQUEST_TEMPLATE.md @@ -13,4 +13,4 @@ Before we can consider review and merge, please make sure the following list is If an entry in not applicable, you can check it or remove it from the list. - [ ] In case of feature or enhancement: documentation updated accordingly -- [ ] Unless it's docs or a minor change: add [changelog](https://mailu.io/1.6/contributors/guide.html#changelog) entry file. +- [ ] Unless it's docs or a minor change: add [changelog](https://mailu.io/master/contributors/guide.html#changelog) entry file.