git-bot-feedback 0.0.1__cp310-abi3-win_amd64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,5 @@
1
+ from .git_bot_feedback import *
2
+
3
+ __doc__ = git_bot_feedback.__doc__
4
+ if hasattr(git_bot_feedback, "__all__"):
5
+ __all__ = git_bot_feedback.__all__
@@ -0,0 +1,240 @@
1
+ from enum import Enum
2
+ from pathlib import Path
3
+ from typing import NamedTuple
4
+
5
+ class GitClient:
6
+ def __init__(self) -> None: ...
7
+ def is_pr_event(self) -> bool: ...
8
+ def is_debug_enabled(self) -> bool: ...
9
+ @property
10
+ def event_name(self) -> str | None: ...
11
+ def set_user_agent(self, user_agent: str) -> None: ...
12
+ async def get_list_of_changed_files(
13
+ self,
14
+ file_filter: FileFilter,
15
+ lines_changed_only: LinesChangedOnly,
16
+ base_diff: str | None = None,
17
+ ignore_index: bool = False,
18
+ ) -> dict[str, FileDiffLines]: ...
19
+ async def post_thread_comment(self, options: ThreadCommentOptions) -> None: ...
20
+ def append_step_summary(self, comment: str) -> None: ...
21
+ async def cull_pr_reviews(self, options: ReviewOptions) -> ReviewOptions: ...
22
+ async def post_pr_review(self, options: ReviewOptions) -> None: ...
23
+ def write_output_variables(
24
+ self, output_variables: list[OutputVariable]
25
+ ) -> None: ...
26
+ def write_file_annotations(self, annotations: list[FileAnnotation]) -> None: ...
27
+ @property
28
+ def client_kind(self) -> str: ...
29
+
30
+ class OutputVariable:
31
+ def __init__(self, name: str, value: str) -> None: ...
32
+ def validate(self) -> bool: ...
33
+ @property
34
+ def name(self) -> str: ...
35
+ @name.setter
36
+ def name(self, name: str) -> None: ...
37
+ @property
38
+ def value(self) -> str: ...
39
+ @value.setter
40
+ def value(self, value: str) -> None: ...
41
+
42
+ class AnnotationLevel(Enum):
43
+ Debug = ...
44
+ Notice = ...
45
+ Warning = ...
46
+ Error = ...
47
+
48
+ class FileAnnotation:
49
+ def __init__(
50
+ self,
51
+ severity: AnnotationLevel,
52
+ path: str,
53
+ message: str,
54
+ start_line: int | None = None,
55
+ end_line: int | None = None,
56
+ start_column: int | None = None,
57
+ end_column: int | None = None,
58
+ title: str | None = None,
59
+ ) -> None: ...
60
+ @property
61
+ def severity(self) -> AnnotationLevel: ...
62
+ @severity.setter
63
+ def severity(self, val: AnnotationLevel) -> None: ...
64
+ @property
65
+ def path(self) -> str: ...
66
+ @path.setter
67
+ def path(self, val: str) -> None: ...
68
+ @property
69
+ def message(self) -> str: ...
70
+ @message.setter
71
+ def message(self, val: str) -> None: ...
72
+ @property
73
+ def start_line(self) -> int | None: ...
74
+ @start_line.setter
75
+ def start_line(self, val: int | None) -> None: ...
76
+ @property
77
+ def end_line(self) -> int | None: ...
78
+ @end_line.setter
79
+ def end_line(self, val: int | None) -> None: ...
80
+ @property
81
+ def start_column(self) -> int | None: ...
82
+ @start_column.setter
83
+ def start_column(self, val: int | None) -> None: ...
84
+ @property
85
+ def end_column(self) -> int | None: ...
86
+ @end_column.setter
87
+ def end_column(self, val: int | None) -> None: ...
88
+ @property
89
+ def title(self) -> str | None: ...
90
+ @title.setter
91
+ def title(self, val: str | None) -> None: ...
92
+
93
+ class DiffHunkHeader(NamedTuple):
94
+ old_start: int
95
+ old_lines: int
96
+ new_start: int
97
+ new_lines: int
98
+
99
+ class FileDiffLines:
100
+ def __init__(self) -> None: ...
101
+ def is_hunk_in_diff(self, hunk: DiffHunkHeader) -> tuple[int, int] | None: ...
102
+ def is_line_in_diff(self, line: int) -> bool: ...
103
+ @property
104
+ def added_lines(self) -> list[int]: ...
105
+ @property
106
+ def added_ranges(self) -> list[tuple[int, int]]: ...
107
+ @property
108
+ def diff_hunks(self) -> list[tuple[int, int]]: ...
109
+
110
+ class FileFilter:
111
+ def __init__(
112
+ self, ignore: list[str], extensions: list[str], log_scope: str | None = None
113
+ ) -> None: ...
114
+ def parse_submodules(self, manifest_path: str | Path | None = None) -> None: ...
115
+ def is_file_in_list(self, file_path: str | Path, ignored: bool) -> bool: ...
116
+ def is_file_ignored(self, file_path: str | Path) -> bool: ...
117
+ def is_file_not_ignored(self, file_path: str | Path) -> bool: ...
118
+ def is_qualified(self, file_path: str | Path) -> bool: ...
119
+ def walk_dir(self, root_path: str | Path) -> set[str]: ...
120
+ @property
121
+ def extensions(self) -> set[str]: ...
122
+ @property
123
+ def ignored(self) -> set[str]: ...
124
+ @property
125
+ def not_ignored(self) -> set[str]: ...
126
+
127
+ class LinesChangedOnly(Enum):
128
+ On = ...
129
+ Off = ...
130
+ Diff = ...
131
+
132
+ def parse_diff(
133
+ diff: str,
134
+ file_filter: FileFilter,
135
+ lines_changed_only: LinesChangedOnly | None = None,
136
+ ) -> dict[str, FileDiffLines]: ...
137
+
138
+ class ReviewAction(Enum):
139
+ Approve = ...
140
+ RequestChanges = ...
141
+ Comment = ...
142
+
143
+ class ReviewComment:
144
+ def __init__(
145
+ self, path: str, comment: str, line_end: int, line_start: int | None = None
146
+ ) -> None: ...
147
+ @property
148
+ def line_start(self) -> int | None: ...
149
+ @line_start.setter
150
+ def line_start(self, val: int | None) -> None: ...
151
+ @property
152
+ def line_end(self) -> int: ...
153
+ @line_end.setter
154
+ def line_end(self, val: int) -> None: ...
155
+ @property
156
+ def comment(self) -> str: ...
157
+ @comment.setter
158
+ def comment(self, val: str) -> None: ...
159
+ @property
160
+ def path(self) -> str: ...
161
+ @path.setter
162
+ def path(self, val: str) -> None: ...
163
+
164
+ class ReviewOptions:
165
+ def __init__(
166
+ self,
167
+ comments: list[ReviewComment],
168
+ action: ReviewAction | None = None,
169
+ summary: str | None = None,
170
+ marker: str | None = None,
171
+ allow_draft: bool = False,
172
+ allow_closed: bool = False,
173
+ delete_review_comments: bool = False,
174
+ ) -> None: ...
175
+ @property
176
+ def comments(self) -> list[ReviewComment]: ...
177
+ @comments.setter
178
+ def comments(self, val: list[ReviewComment]) -> None: ...
179
+ @property
180
+ def action(self) -> ReviewAction | None: ...
181
+ @action.setter
182
+ def action(self, val: ReviewAction) -> None: ...
183
+ @property
184
+ def summary(self) -> str | None: ...
185
+ @summary.setter
186
+ def summary(self, val: str) -> None: ...
187
+ @property
188
+ def marker(self) -> str: ...
189
+ @marker.setter
190
+ def marker(self, val: str) -> None: ...
191
+ @property
192
+ def allow_draft(self) -> bool: ...
193
+ @allow_draft.setter
194
+ def allow_draft(self, val: bool) -> None: ...
195
+ @property
196
+ def allow_closed(self) -> bool: ...
197
+ @allow_closed.setter
198
+ def allow_closed(self, val: bool) -> None: ...
199
+ @property
200
+ def delete_review_comments(self) -> bool: ...
201
+ @delete_review_comments.setter
202
+ def delete_review_comments(self, val: bool) -> None: ...
203
+
204
+ class CommentKind(Enum):
205
+ Concerns = ...
206
+ Lgtm = ...
207
+
208
+ class CommentPolicy(Enum):
209
+ Anew = ...
210
+ Update = ...
211
+
212
+ class ThreadCommentOptions:
213
+ def __init__(
214
+ self,
215
+ policy: CommentPolicy | None = None,
216
+ comment: str | None = None,
217
+ kind: CommentKind | None = None,
218
+ marker: str | None = None,
219
+ no_lgtm: bool = False,
220
+ ) -> None: ...
221
+ @property
222
+ def policy(self) -> CommentPolicy | None: ...
223
+ @policy.setter
224
+ def policy(self, val: CommentPolicy) -> None: ...
225
+ @property
226
+ def comment(self) -> str | None: ...
227
+ @comment.setter
228
+ def comment(self, val: str) -> None: ...
229
+ @property
230
+ def kind(self) -> CommentKind | None: ...
231
+ @kind.setter
232
+ def kind(self, val: CommentKind) -> None: ...
233
+ @property
234
+ def marker(self) -> str | None: ...
235
+ @marker.setter
236
+ def marker(self, val: str) -> None: ...
237
+ @property
238
+ def no_lgtm(self) -> bool: ...
239
+ @no_lgtm.setter
240
+ def no_lgtm(self, val: bool) -> None: ...
Binary file
File without changes
@@ -0,0 +1,94 @@
1
+ Metadata-Version: 2.4
2
+ Name: git-bot-feedback
3
+ Version: 0.0.1
4
+ Classifier: Development Status :: 5 - Production/Stable
5
+ Classifier: Intended Audience :: Developers
6
+ Classifier: Intended Audience :: System Administrators
7
+ Classifier: Intended Audience :: Information Technology
8
+ Classifier: Natural Language :: English
9
+ Classifier: Operating System :: Microsoft :: Windows
10
+ Classifier: Operating System :: POSIX :: Linux
11
+ Classifier: Operating System :: MacOS
12
+ Classifier: Programming Language :: Python :: 3
13
+ Classifier: Topic :: Software Development :: Build Tools
14
+ Classifier: Programming Language :: Rust
15
+ Classifier: Programming Language :: Python :: Implementation :: CPython
16
+ Classifier: Programming Language :: Python :: Implementation :: PyPy
17
+ Summary: A Python library (written in Rust) designed for CI tools to easily submit feedback on a git server.
18
+ Keywords: git,client,github,bot,rust
19
+ Author-email: Brendan Doherty <2bndy5@gmail.com>
20
+ License: GPL-3.0-or-later
21
+ Requires-Python: >=3.10
22
+ Description-Content-Type: text/x-rst; charset=UTF-8
23
+ Project-URL: source, https://github.com/2bndy5/git-bot-feedback
24
+ Project-URL: tracker, https://github.com/2bndy5/git-bot-feedback/issues
25
+
26
+ ================
27
+ git-bot-feedback
28
+ ================
29
+
30
+ |pypi-badge|
31
+ |py-ci-badge|
32
+ |docs-badge|
33
+ |license-badge|
34
+
35
+ A Python library (written in Rust) designed for CI tools to easily submit feedback on a git server.
36
+
37
+ Feedback on a git server using this library can be in the form of
38
+
39
+ - thread comments (for a PR or commit)
40
+ - setting output variables for other CI tools to consume
41
+ - append a summary comment to a CI workflow run's summary page
42
+ - mark the start and end of a group of log statements (in the CI workflow run's
43
+ logs)
44
+ - files annotations
45
+ - Pull Request reviews
46
+ - get a list of changed files in a PR or commit (including line numbers shown in the diff)
47
+
48
+ This uses async functions to access network resources. Thus, an ``asyncio`` event
49
+ loop is required.
50
+
51
+ Supported git servers
52
+ ---------------------
53
+
54
+ Initially, this project is designed to work with GitHub.
55
+ But the API is designed to easily add support for other git servers.
56
+ The following is just a list of git servers that are planned (in order or priority).
57
+
58
+ - GitHub
59
+ - GitLab
60
+ - Gitea
61
+ - BitBucket
62
+
63
+ GPL license
64
+ -----------
65
+
66
+ .. _GPL-3.0-or-later: https://github.com/2bndy5/git-bot-feedback/blob/main/LICENSE
67
+
68
+ This project is licensed under `GPL-3.0-or-later`_.
69
+
70
+ Since this library ultimately requires write access to
71
+ users' projects (to allow posting comments),
72
+ it could easily be modified with malicious intent.
73
+
74
+ By using the `GPL-3.0-or-later`_ license,
75
+ we can offer some assurance and help safeguard end-users' data/privacy
76
+ because the following conditions must be met:
77
+
78
+ - the source code is publicly available
79
+ - any redistributed forms must state their modifications (if any)
80
+ - any redistributed forms must use the same `GPL-3.0-or-later`_ license
81
+
82
+ .. |docs-badge| image:: https://img.shields.io/github/deployments/2bndy5/git-bot-feedback/github-pages?logo=github&label=docs
83
+ :alt: GitHub pages
84
+ :target: https://2bndy5.github.io/git-bot-feedback
85
+ .. |license-badge| image:: https://img.shields.io/github/license/2bndy5/git-bot-feedback
86
+ :alt: GitHub License
87
+ :target: https://github.com/2bndy5/git-bot-feedback/blob/main/LICENSE
88
+ .. |py-ci-badge| image:: https://github.com/2bndy5/git-bot-feedback/actions/workflows/python.yml/badge.svg
89
+ :alt: Python CI
90
+ :target: https://github.com/2bndy5/git-bot-feedback/actions/workflows/python.yml
91
+ .. |pypi-badge| image:: https://img.shields.io/pypi/v/git-bot-feedback
92
+ :alt: PyPI Version
93
+ :target: https://pypi.org/project/git-bot-feedback
94
+
@@ -0,0 +1,8 @@
1
+ git_bot_feedback/__init__.py,sha256=szE2DOFTYtupkw_Mvrp6YWME0VWL4LPD-gExPALlZQ4,147
2
+ git_bot_feedback/__init__.pyi,sha256=sjNYpBEM24rjjlQVTIVZY57mb3CelGv_rEf1BIrXZJ8,7591
3
+ git_bot_feedback/git_bot_feedback.pyd,sha256=_wPf37NJoFMnDGGNQBfjcKc_VBcdLtR2h6hVTSxpuW4,8043520
4
+ git_bot_feedback/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
+ git_bot_feedback-0.0.1.dist-info/METADATA,sha256=NzSJ8R74YB9ImFmQ4wUCg7__1b7oEIkHBlvaIZhAFWI,3627
6
+ git_bot_feedback-0.0.1.dist-info/WHEEL,sha256=_qjkWZs5yrFgc7wGyX42BWq6PiACrY0XI82VSrZ_57E,96
7
+ git_bot_feedback-0.0.1.dist-info/sboms/git-bot-feedback-py.cyclonedx.json,sha256=8uY2Hli0uM8vMyTMrhUGmJn_MfwROBLM10wKK-9Tbnk,187529
8
+ git_bot_feedback-0.0.1.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: maturin (1.14.1)
3
+ Root-Is-Purelib: false
4
+ Tag: cp310-abi3-win_amd64