-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove email addresses and (!UNKNOWN) from author names (#389)
* Remove email addresses and (!UNKNOWN) from author names. * Improve email matching.
- Loading branch information
1 parent
8789427
commit 5023129
Showing
6 changed files
with
30 additions
and
3 deletions.
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,2 @@ | ||
minor_changes: | ||
- "Remove email addresses and ``(!UNKNOWN)`` from plugin and role author names (https://github.com/ansible-community/antsibull/pull/389)." |
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
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,6 +1,6 @@ | ||
import pytest | ||
|
||
from antsibull.jinja2.filters import rst_ify, rst_escape, move_first | ||
from antsibull.jinja2.filters import rst_ify, rst_escape, move_first, massage_author_name | ||
|
||
|
||
RST_IFY_DATA = { | ||
|
@@ -68,3 +68,17 @@ def test_escape_ify(value, expected): | |
@pytest.mark.parametrize('input, move_to_beginning, expected', MOVE_FIRST_DATA) | ||
def test_move_first(input, move_to_beginning, expected): | ||
assert move_first(input, *move_to_beginning) == expected | ||
|
||
|
||
MASSAGE_AUTHOR_NAME = [ | ||
('', ''), | ||
('John Doe (@johndoe) <[email protected]>', 'John Doe (@johndoe) '), | ||
('John Doe (@johndoe) [email protected]', 'John Doe (@johndoe) '), | ||
('John Doe (@johndoe) ([email protected])', 'John Doe (@johndoe) '), | ||
('John Doe (@johndoe, [email protected])', 'John Doe (@johndoe, )'), | ||
] | ||
|
||
|
||
@pytest.mark.parametrize('input, expected', MASSAGE_AUTHOR_NAME) | ||
def test_massage_author_name(input, expected): | ||
assert massage_author_name(input) == expected |