providers ¤
Module containing the parsing utilities for git providers.
Classes:
-
Bitbucket
–A parser for the Bitbucket references.
-
GitHub
–A parser for the GitHub references.
-
GitLab
–A parser for the GitLab references.
-
ProviderRefParser
–A base class for specific providers reference parsers.
-
Ref
–A class to represent a reference and its URL.
-
RefDef
–A class to store a reference regular expression and URL building string.
-
RefRe
–An enum helper to store parts of regular expressions for references.
Bitbucket ¤
Bases: ProviderRefParser
A parser for the Bitbucket references.
Parameters:
-
namespace
(str
) –The Bitbucket namespace.
-
project
(str
) –The Bitbucket project.
-
url
(str | None
, default:None
) –The Bitbucket URL.
Methods:
-
get_refs
–Find all references in the given text.
-
parse_refs
–Parse references in the given text.
Source code in src/git_changelog/providers.py
63 64 65 66 67 68 69 70 71 72 73 |
|
get_refs ¤
Find all references in the given text.
Parameters:
Returns:
Source code in src/git_changelog/providers.py
75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
|
parse_refs ¤
Parse references in the given text.
Parameters:
Returns:
Source code in src/git_changelog/providers.py
90 91 92 93 94 95 96 97 98 99 100 101 102 103 |
|
GitHub ¤
Bases: ProviderRefParser
A parser for the GitHub references.
Parameters:
-
namespace
(str
) –The Bitbucket namespace.
-
project
(str
) –The Bitbucket project.
-
url
(str | None
, default:None
) –The Bitbucket URL.
Methods:
-
get_refs
–Find all references in the given text.
-
parse_refs
–Parse references in the given text.
Source code in src/git_changelog/providers.py
63 64 65 66 67 68 69 70 71 72 73 |
|
get_refs ¤
Find all references in the given text.
Parameters:
Returns:
Source code in src/git_changelog/providers.py
75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
|
parse_refs ¤
Parse references in the given text.
Parameters:
Returns:
Source code in src/git_changelog/providers.py
90 91 92 93 94 95 96 97 98 99 100 101 102 103 |
|
GitLab ¤
Bases: ProviderRefParser
A parser for the GitLab references.
Parameters:
-
namespace
(str
) –The Bitbucket namespace.
-
project
(str
) –The Bitbucket project.
-
url
(str | None
, default:None
) –The Bitbucket URL.
Methods:
-
get_refs
–Find all references in the given text.
-
parse_refs
–Parse references in the given text.
Source code in src/git_changelog/providers.py
63 64 65 66 67 68 69 70 71 72 73 |
|
get_refs ¤
Find all references in the given text.
Parameters:
Returns:
Source code in src/git_changelog/providers.py
75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
|
parse_refs ¤
Parse references in the given text.
Parameters:
Returns:
Source code in src/git_changelog/providers.py
90 91 92 93 94 95 96 97 98 99 100 101 102 103 |
|
ProviderRefParser ¤
Bases: ABC
A base class for specific providers reference parsers.
Parameters:
-
namespace
(str
) –The Bitbucket namespace.
-
project
(str
) –The Bitbucket project.
-
url
(str | None
, default:None
) –The Bitbucket URL.
Methods:
-
build_ref_url
–Build the URL for a reference type and a dictionary of matched groups.
-
get_compare_url
–Get the URL for a tag comparison.
-
get_refs
–Find all references in the given text.
-
get_tag_url
–Get the URL for a git tag.
-
parse_refs
–Parse references in the given text.
Source code in src/git_changelog/providers.py
63 64 65 66 67 68 69 70 71 72 73 |
|
build_ref_url ¤
Build the URL for a reference type and a dictionary of matched groups.
Parameters:
Returns:
-
str
–The built URL.
Source code in src/git_changelog/providers.py
105 106 107 108 109 110 111 112 113 114 115 |
|
get_compare_url abstractmethod
¤
Get the URL for a tag comparison.
Parameters:
Returns:
-
str
–The comparison URL.
Source code in src/git_changelog/providers.py
129 130 131 132 133 134 135 136 137 138 139 140 |
|
get_refs ¤
Find all references in the given text.
Parameters:
Returns:
Source code in src/git_changelog/providers.py
75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
|
get_tag_url abstractmethod
¤
Get the URL for a git tag.
Parameters:
-
tag
(str
) –The git tag.
Returns:
-
str
–The tag URL.
Source code in src/git_changelog/providers.py
117 118 119 120 121 122 123 124 125 126 127 |
|
parse_refs ¤
Parse references in the given text.
Parameters:
Returns:
Source code in src/git_changelog/providers.py
90 91 92 93 94 95 96 97 98 99 100 101 102 103 |
|
Ref ¤
A class to represent a reference and its URL.
Parameters:
Source code in src/git_changelog/providers.py
27 28 29 30 31 32 33 34 35 |
|
RefDef ¤
A class to store a reference regular expression and URL building string.
Parameters:
-
regex
(Pattern
) –The regular expression to match the reference.
-
url_string
(str
) –The URL string to format using matched groups.
Source code in src/git_changelog/providers.py
44 45 46 47 48 49 50 51 52 |
|
RefRe ¤
An enum helper to store parts of regular expressions for references.