forked from executablebooks/MyST-Parser
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Resolves executablebooks#454
- Loading branch information
Showing
12 changed files
with
317 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
enforce_name: | ||
suffix: .md | ||
exclude: | ||
bots: | ||
- dependabot-preview | ||
- dependabot | ||
- patchback | ||
humans: | ||
- pyup-bot | ||
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
|
||
{% for section, _ in sections.items() %} | ||
{% set title_prefix = underlines[0] %} | ||
{% if section %} | ||
{{ title_prefix }} {{ section }} | ||
{% set title_prefix = underlines[1] %} | ||
{% endif %} | ||
|
||
{% if sections[section] %} | ||
{% for category, val in definitions.items() if category in sections[section] %} | ||
{{ title_prefix }} {{ definitions[category]['name'] }} | ||
{% if definitions[category]['showcontent'] %} | ||
|
||
{% for text, values in sections[section][category].items() %} | ||
* {{ text }} | ||
({{ values|join(',\n ') }}) | ||
{% endfor -%} | ||
|
||
{% else %} | ||
* {{ sections[section][category]['']|join(', ') }} | ||
{% endif %} | ||
|
||
{% if sections[section][category]|length == 0 %} | ||
No significant changes. | ||
{% endif %} | ||
{% endfor %} | ||
|
||
{% else %} | ||
No significant changes. | ||
{% endif %} | ||
{% endfor %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
* | ||
!.CHANGELOG-TEMPLATE.md.j2 | ||
!.gitignore | ||
!README.md | ||
!*.bugfix | ||
!*.bugfix.md | ||
!*.bugfix.*.md | ||
!*.breaking | ||
!*.breaking.md | ||
!*.breaking.*.md | ||
!*.deprecation | ||
!*.deprecation.md | ||
!*.deprecation.*.md | ||
!*.doc | ||
!*.doc.md | ||
!*.doc.*.md | ||
!*.feature | ||
!*.feature.md | ||
!*.feature.*.md | ||
!*.internal | ||
!*.internal.md | ||
!*.internal.*.md | ||
!*.misc | ||
!*.misc.md | ||
!*.misc.*.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Added changelog fragment management infrastructure using [Towncrier] | ||
-- by {user}`webknjaz` | ||
|
||
[Towncrier]: https://github.com/twisted/towncrier |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
<!-- markdownlint-disable first-line-heading --> | ||
|
||
(_myst_parser_adding_changelog_fragments)= | ||
|
||
## Adding change notes with your PRs | ||
|
||
It is very important to maintain a log for news of how | ||
updating to the new version of the software will affect | ||
end-users. This is why we enforce collection of the change | ||
fragment files in pull requests as per [Towncrier philosophy]. | ||
|
||
The idea is that when somebody makes a change, they must record | ||
the bits that would affect end-users only including information | ||
that would be useful to them. Then, when the maintainers publish | ||
a new release, they'll automatically use these records to compose | ||
a change log for the respective version. It is important to | ||
understand that including unnecessary low-level implementation | ||
related details generates noise that is not particularly useful | ||
to the end-users most of the time. And so such details should be | ||
recorded in the Git history rather than a changelog. | ||
|
||
## Alright! So how do I add a news fragment? | ||
|
||
To submit a change note about your PR, add a text file into the | ||
`docs/changelog-fragments.d/` folder. It should contain an | ||
explanation of what applying this PR will change in the way | ||
end-users interact with the project. One sentence is usually | ||
enough but feel free to add as many details as you feel necessary | ||
for the users to understand what it means. | ||
|
||
**Use the past tense** for the text in your fragment because, | ||
combined with others, it will be a part of the "news digest" | ||
telling the readers **what changed** in a specific version of | ||
the library *since the previous version*. You should also use | ||
[MyST Markdown] syntax for highlighting code (inline or block), | ||
linking parts of the docs or external sites. | ||
At the end, sign your change note by adding ```-- by | ||
{user}`github-username``` (replace `github-username` with | ||
your own!). | ||
|
||
Finally, name your file following the convention that Towncrier | ||
understands: it should start with the number of an issue or a | ||
PR followed by a dot, then add a patch type, like `feature`, | ||
`bugfix`, `doc`, `misc` etc., and add `.md` as a suffix. If you | ||
need to add more than one fragment, you may add an optional | ||
sequence number (delimited with another period) between the type | ||
and the suffix. | ||
|
||
## Examples for changelog entries adding to your Pull Requests | ||
|
||
File `docs/changelog-fragments.d/666.doc.md`: | ||
|
||
```md | ||
Added a `{user}` role to Sphinx config -- by {user}`webknjaz` | ||
``` | ||
|
||
File `docs/changelog-fragments.d/116.feature.md`: | ||
|
||
```md | ||
Added support for nested module options (suboptions) | ||
-- by {user}`tomaciazek` | ||
``` | ||
|
||
File `docs/changelog-fragments.d/140.bugfix.md`: | ||
|
||
```md | ||
Implemented opening standalone Ansible files that have no workspace | ||
associated -- by {user}`ganeshrn` | ||
``` | ||
|
||
```{tip} | ||
See `pyproject.toml` for all available categories | ||
(`tool.towncrier.type`). | ||
``` | ||
|
||
[MyST Markdown]: | ||
https://myst-parser.rtfd.io/en/latest/syntax/syntax.html | ||
[Towncrier philosophy]: | ||
https://towncrier.rtfd.io/en/actual-freaking-docs/#philosophy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,23 @@ | ||
# Changelog | ||
|
||
```{include} ../../CHANGELOG.md | ||
:end-before: <!-- towncrier release notes start --> | ||
:start-after: (DO-NOT-REMOVE-versioning-promise-START) | ||
``` | ||
|
||
<!-- markdownlint-disable-next-line no-space-in-emphasis --> | ||
## {{ release_l }}, as of {sub-ref}`today` _{subscript}`/UNRELEASED DRAFT/`_ | ||
|
||
```{important} This version is not yet released and is under active development | ||
``` | ||
|
||
```{towncrier-draft-entries} | ||
``` | ||
|
||
```{include} ../../CHANGELOG.md | ||
:relative-docs: docs/ | ||
:relative-images: | ||
:start-after: <!-- towncrier release notes start --> | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.