Skip to content

Commit 13374a7

Browse files
committed
Replace |project| RST substitution @ change logs
1 parent b70175b commit 13374a7

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

.github/workflows/ci-cd.yml

+1
Original file line numberDiff line numberDiff line change
@@ -536,6 +536,7 @@ jobs:
536536
-e 's/:gh:`\([-.a-zA-Z0-9]\+\)`/https:\/\/github.com\/\1/g'
537537
-e 's/:\(issue\|pr\):`\([0-9]\+\)`/#\2/g'
538538
-e 's/:user:`\([-.a-zA-Z0-9]\+\)`/@\1/g'
539+
-e 's/|project|/ansible-pylibssh/g'
539540
'${{ needs.pre-setup.outputs.changelog-draft-name-rst }}'
540541
shell: bash
541542
- name: Install pandoc via apt

packaging/pep517_backend/_transformers.py

+4
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,9 @@ def sanitize_rst_roles(rst_source_text: str) -> str: # noqa: WPS210
9292
"""
9393
substitution_pattern = r'``\g<rendered_text>``'
9494

95+
project_substitution_regex = '|project|'
96+
project_substitution_pattern = 'ansible-pylibssh'
97+
9598
substitutions = (
9699
(pep_role_regex, pep_substitution_pattern),
97100
(user_role_regex, user_substitution_pattern),
@@ -101,6 +104,7 @@ def sanitize_rst_roles(rst_source_text: str) -> str: # noqa: WPS210
101104
(gh_role_regex, gh_substitution_pattern),
102105
(meth_role_regex, meth_substitution_pattern),
103106
(role_regex, substitution_pattern),
107+
(project_substitution_regex, project_substitution_pattern),
104108
)
105109

106110
rst_source_normalized_text = rst_source_text

0 commit comments

Comments
 (0)