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
64 65 66 67 68 69 70 71 72 73 74 |
|
get_refs ¤
Find all references in the given text.
Parameters:
Returns:
Source code in src/git_changelog/providers.py
76 77 78 79 80 81 82 83 84 85 86 87 88 89 |
|
parse_refs ¤
Parse references in the given text.
Parameters:
Returns:
Source code in src/git_changelog/providers.py
91 92 93 94 95 96 97 98 99 100 101 102 103 104 |
|
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
64 65 66 67 68 69 70 71 72 73 74 |
|
get_refs ¤
Find all references in the given text.
Parameters:
Returns:
Source code in src/git_changelog/providers.py
76 77 78 79 80 81 82 83 84 85 86 87 88 89 |
|
parse_refs ¤
Parse references in the given text.
Parameters:
Returns:
Source code in src/git_changelog/providers.py
91 92 93 94 95 96 97 98 99 100 101 102 103 104 |
|
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
64 65 66 67 68 69 70 71 72 73 74 |
|
get_refs ¤
Find all references in the given text.
Parameters:
Returns:
Source code in src/git_changelog/providers.py
76 77 78 79 80 81 82 83 84 85 86 87 88 89 |
|
parse_refs ¤
Parse references in the given text.
Parameters:
Returns:
Source code in src/git_changelog/providers.py
91 92 93 94 95 96 97 98 99 100 101 102 103 104 |
|
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
64 65 66 67 68 69 70 71 72 73 74 |
|
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
106 107 108 109 110 111 112 113 114 115 116 |
|
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
130 131 132 133 134 135 136 137 138 139 140 141 |
|
get_refs ¤
Find all references in the given text.
Parameters:
Returns:
Source code in src/git_changelog/providers.py
76 77 78 79 80 81 82 83 84 85 86 87 88 89 |
|
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
118 119 120 121 122 123 124 125 126 127 128 |
|
parse_refs ¤
Parse references in the given text.
Parameters:
Returns:
Source code in src/git_changelog/providers.py
91 92 93 94 95 96 97 98 99 100 101 102 103 104 |
|
Ref ¤
A class to represent a reference and its URL.
Parameters:
Source code in src/git_changelog/providers.py
28 29 30 31 32 33 34 35 36 |
|
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
45 46 47 48 49 50 51 52 53 |
|
RefRe ¤
An enum helper to store parts of regular expressions for references.