-
-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
203 additions
and
76 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 |
---|---|---|
|
@@ -2,4 +2,6 @@ | |
Pipfile.lock | ||
example/ | ||
example2/ | ||
output.md | ||
example3/ | ||
output.md | ||
__pycache__/ |
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 +1 @@ | ||
- {{ commit.subject }} ([{{ commit.hash }}]({{ commit.url }})) | ||
- {{ commit.subject }} ([{{ commit.hash|truncate(7, True, '') }}]({{ commit.url }})) |
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,4 +1,4 @@ | ||
### {{ section.type or "Misc" }} | ||
{% for commit in section.commits -%} | ||
{% for commit in section.commits|sort(attribute='subject') -%} | ||
{% include 'commit.md' with context %} | ||
{% endfor %} |
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 was deleted.
Oops, something went wrong.
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,29 @@ | ||
import gitolog | ||
|
||
message = """ | ||
This is the subject #1 | ||
This is the body. Related: #2. Also mentions #3 and #4. | ||
Closes #5. closed #6, #7. FIX: #89 and #10. | ||
Resolve #1111. | ||
Also support other projects references like shellm-org/shellm-data#19!! | ||
Or fix pawamoy/gitolog#1. | ||
Don't match this one: #01. | ||
""" | ||
|
||
|
||
def test_github_issue_parsing(): | ||
matches = gitolog.GitHub.parse_issues_refs(message) | ||
for match in matches: | ||
print(match) | ||
|
||
|
||
def test_gitlab_issue_parsing(): | ||
matches = gitolog.GitLab.parse_issues_refs(message) | ||
for match in matches: | ||
print(match) | ||
|
||
|
||
if __name__ == '__main__': | ||
# test_github_issue_parsing() | ||
test_gitlab_issue_parsing() |