Highlight headers in PR template

This commit is contained in:
Mikhail f. Shiryaev 2022-04-05 00:52:37 +02:00
parent 9e2f0d25f3
commit 1d60824d6a
No known key found for this signature in database
GPG Key ID: 4B02ED204C7D93F4
2 changed files with 4 additions and 4 deletions

View File

@ -1,4 +1,4 @@
Changelog category (leave one): ## Changelog category (leave one):
- New Feature - New Feature
- Improvement - Improvement
- Bug Fix (user-visible misbehaviour in official stable or prestable release) - Bug Fix (user-visible misbehaviour in official stable or prestable release)
@ -9,7 +9,7 @@ Changelog category (leave one):
- Not for changelog (changelog entry is not required) - Not for changelog (changelog entry is not required)
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md): ## Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
... ...

View File

@ -162,7 +162,7 @@ def check_pr_description(pr_info):
i = 0 i = 0
while i < len(lines): while i < len(lines):
if re.match(r"(?i)^[>*_ ]*change\s*log\s*category", lines[i]): if re.match(r"(?i)^[#>*_ ]*change\s*log\s*category", lines[i]):
i += 1 i += 1
if i >= len(lines): if i >= len(lines):
break break
@ -191,7 +191,7 @@ def check_pr_description(pr_info):
return result_status[:140], category return result_status[:140], category
elif re.match( elif re.match(
r"(?i)^[>*_ ]*(short\s*description|change\s*log\s*entry)", lines[i] r"(?i)^[#>*_ ]*(short\s*description|change\s*log\s*entry)", lines[i]
): ):
i += 1 i += 1
# Can have one empty line between header and the entry itself. # Can have one empty line between header and the entry itself.