@@ -557,7 +557,7 @@ author, you are free to customize how these are presented in the rendered templa
557
557
558
558
.. note ::
559
559
If you are using a custom commit parser following the guide at
560
- :ref: `commit-parser-writing-your-own-parser `, your custom implementations of
560
+ :ref: `commit_parser-custom_parser `, your custom implementations of
561
561
:py:class: `ParseResult <semantic_release.commit_parser.token.ParseResult> `,
562
562
:py:class: `ParseError <semantic_release.commit_parser.token.ParseError> `
563
563
and :py:class: `ParsedCommit <semantic_release.commit_parser.token.ParsedCommit> `
@@ -569,7 +569,7 @@ are of type :py:class:`Version <semantic_release.version.version.Version>`. You
569
569
use the ``as_tag() `` method to render these as the Git tag that they correspond to
570
570
inside your template.
571
571
572
- A :py:class: `Release <semantic_release.changelog.release_history.Release>`object
572
+ A :py:class: `Release <semantic_release.changelog.release_history.Release> ` object
573
573
has an ``elements `` attribute, which has the same structure as the ``unreleased ``
574
574
attribute of a
575
575
:py:class: `ReleaseHistory <semantic_release.changelog.release_history.ReleaseHistory> `;
@@ -592,7 +592,8 @@ type, it's recommended to use Jinja's
592
592
`dictsort <https://jinja.palletsprojects.com/en/3.1.x/templates/#jinja-filters.dictsort >`_
593
593
filter.
594
594
595
- Each ``Release `` object also has the following attributes:
595
+ Each :py:class: `Release <semantic_release.changelog.release_history.Release> `
596
+ object also has the following attributes:
596
597
597
598
* ``tagger: git.Actor ``: The tagger who tagged the release.
598
599
@@ -601,8 +602,8 @@ Each ``Release`` object also has the following attributes:
601
602
* ``tagged_date: datetime ``: The date and time at which the release was tagged.
602
603
603
604
.. seealso ::
604
- * :ref: `commit-parser -builtin `
605
- * :ref: `Commit Parser Tokens <commit-parser -tokens >`
605
+ * :ref: `commit_parser -builtin `
606
+ * :ref: `Commit Parser Tokens <commit_parser -tokens >`
606
607
* `git.Actor <https://gitpython.readthedocs.io/en/stable/reference.html#git.objects.util.Actor >`_
607
608
* `datetime.strftime Format Codes <https://docs.python.org/3/library/datetime.html#strftime-and-strptime-format-codes >`_
608
609
@@ -632,6 +633,8 @@ The filters provided vary based on the VCS configured and available features:
632
633
633
634
{{ "This is a long string that needs to be wrapped to a specific width" | autofit_text_width(40, 4) }}
634
635
636
+ **Markdown Output: **
637
+
635
638
.. code :: markdown
636
639
637
640
This is a long string that needs to be
@@ -669,6 +672,8 @@ The filters provided vary based on the VCS configured and available features:
669
672
{{ "example/repo.git" | create_server_url }}
670
673
{{ "example/repo" | create_server_url(None, "results=1", "section-header") }}
671
674
675
+ **Markdown Output: **
676
+
672
677
.. code :: markdown
673
678
674
679
https://example.com/example/repo.git
@@ -690,6 +695,8 @@ The filters provided vary based on the VCS configured and available features:
690
695
{{ "releases/tags/v1.0.0" | create_repo_url }}
691
696
{{ "issues" | create_repo_url("q=is%3Aissue+is%3Aclosed") }}
692
697
698
+ **Markdown Output: **
699
+
693
700
.. code :: markdown
694
701
695
702
https://example.com/example/repo/releases/tags/v1.0.0
@@ -706,6 +713,8 @@ The filters provided vary based on the VCS configured and available features:
706
713
707
714
{{ commit.hexsha | commit_hash_url }}
708
715
716
+ **Markdown Output: **
717
+
709
718
.. code :: markdown
710
719
711
720
https://example.com/example/repo/commit/a1b2c3d435657f5d339ba10c7b1ed81b460af51d
@@ -722,13 +731,15 @@ The filters provided vary based on the VCS configured and available features:
722
731
723
732
{{ "v1.0.0" | compare_url("v1.1.0") }}
724
733
734
+ **Markdown Output: **
735
+
725
736
.. code :: markdown
726
737
727
738
https://example.com/example/repo/compare/v1.0.0...v1.1.0
728
739
729
740
* ``issue_url (Callable[[IssueNumStr | IssueNumInt], UrlStr]) ``: given an issue
730
741
number, return a URL to the issue on the remote vcs. In v9.12.2, this filter
731
- was updated to handle a string that has leading prefix symbols (ex. ``#29 ``)
742
+ was updated to handle a string that has leading prefix symbols (ex. ``#32 ``)
732
743
and will strip the prefix before generating the URL.
733
744
734
745
*Introduced in v9.6.0, Modified in v9.12.2. *
@@ -737,11 +748,19 @@ The filters provided vary based on the VCS configured and available features:
737
748
738
749
.. code :: jinja
739
750
740
- {{ "29" | issue_url }}
751
+ {# Add Links to issues annotated in the commit message
752
+ # NOTE: commit.linked_issues is only available in v9.15.0 or greater
753
+ #
754
+ #}{% for issue_ref in commit.linked_issues
755
+ %}{{ "- [%s](%s)" | format(issue_ref, issue_ref | issue_url)
756
+ }}{% endfor
757
+ %}
758
+
759
+ **Markdown Output: **
741
760
742
761
.. code :: markdown
743
762
744
- https://example.com/example/repo/issues/29
763
+ - [#32]( https://example.com/example/repo/issues/32)
745
764
746
765
* ``merge_request_url (Callable[[MergeReqStr | MergeReqInt], UrlStr]) ``: given a
747
766
merge request number, return a URL to the merge request in the remote. This is
@@ -764,6 +783,8 @@ The filters provided vary based on the VCS configured and available features:
764
783
}}
765
784
{# commit.linked_merge_request is only available in v9.13.0 or greater #}
766
785
786
+ **Markdown Output: **
787
+
767
788
.. code :: markdown
768
789
769
790
[#29](https://example.com/example/repo/-/merge_requests/29)
@@ -781,13 +802,16 @@ The filters provided vary based on the VCS configured and available features:
781
802
782
803
.. code :: jinja
783
804
784
- {{
805
+ {# Create a link to the merge request associated with the commit
806
+ # NOTE: commit.linked_merge_request is only available in v9.13.0 or greater
807
+ #}{{
785
808
"[%s](%s)" | format(
786
809
commit.linked_merge_request,
787
810
commit.linked_merge_request | pull_request_url
788
811
)
789
812
}}
790
- {# commit.linked_merge_request is only available in v9.13.0 or greater #}
813
+
814
+ **Markdown Output: **
791
815
792
816
.. code :: markdown
793
817
0 commit comments