Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor rendering of title via config.title_format #610

Merged
merged 4 commits into from
Jun 13, 2024

Conversation

SmileyChris
Copy link
Contributor

@SmileyChris SmileyChris commented Jun 7, 2024

Description

Make title_format work for markdown as well as restructured text.
Fixes #609.

Checklist

  • Make sure changes are covered by existing or new tests.
  • For at least one Python version, make sure local test run is green.
  • Create a file in src/towncrier/newsfragments/. Describe your
    change and include important information. Your change will be included in the public release notes.
  • Make sure all GitHub Actions checks are green (they are automatically checking all of the above).
  • Ensure docs/tutorial.rst is still up-to-date.
  • If you add new configuration options (or change the meaning of existing ones), make sure docs/configuration.rst reflects those changes.

@adiroiban
Copy link
Member

adiroiban commented Jun 7, 2024

Thanks for the PR

For this PR we can continue with the hardcoded support for RST and MD.


I think that in an ideal case, the builder should not care about makrdown or restructured format.

In the future we can also have AsciiDoc, or other formats.

It would be nice for title_format to export all the required variable to be able to build a multi-line jinja template.

@SmileyChris SmileyChris marked this pull request as ready for review June 9, 2024 22:12
@SmileyChris SmileyChris requested a review from a team as a code owner June 9, 2024 22:12
@SmileyChris SmileyChris merged commit 0b7f542 into twisted:trunk Jun 13, 2024
16 checks passed
SmileyChris added a commit to SmileyChris/towncrier that referenced this pull request Jun 13, 2024
* Refactor rendering of title via config.title_format

* Add newsfragment

* Config docs

* Fix restructuredtext formatting error
SmileyChris added a commit that referenced this pull request Jun 14, 2024
* Always content for orphans, since they don't have a concept of tickets

* Add tests for orphans in non showcontent categories

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Add newsfragment

* Add a note in the configuration docs about the change to orphan fragments in non-showcontent categories

* Use rst admonitions for the showcontent notes

* Refactor rendering of title via `config.title_format` (#610)

* Refactor rendering of title via config.title_format

* Add newsfragment

* Config docs

* Fix restructuredtext formatting error

* Refactor issue_key function to sort issues in a human-friendly way (#608)

* Refactor issue_key function to sort issues in a human-friendly way

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Rename newsfragment

* Small improvement to test to show how text with numeric issues are sorted

* Update src/towncrier/_builder.py docstring grammar

Co-authored-by: Adi Roiban <[email protected]>

* clarify new behaviour in newsfragment

* Add some docstrings/comments to tests

* linelength fix

* Clarify news fragments vs tickets

Co-authored-by: Adi Roiban <[email protected]>

* Consistent use of "issue" rather than "ticket"

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* typo

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Adi Roiban <[email protected]>

* variable now called issue instead of ticket

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Adi Roiban <[email protected]>
adiroiban added a commit that referenced this pull request Aug 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The title_format configuration option assumes restructuredtext
2 participants