git-bot-feedback 0.0.1__tar.gz → 0.2.0__tar.gz

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.
Files changed (57) hide show
  1. {git_bot_feedback-0.0.1 → git_bot_feedback-0.2.0}/.gitattributes +1 -0
  2. {git_bot_feedback-0.0.1 → git_bot_feedback-0.2.0}/.pre-commit-config.yaml +4 -1
  3. {git_bot_feedback-0.0.1/bindings/python → git_bot_feedback-0.2.0}/CHANGELOG.md +10 -5
  4. {git_bot_feedback-0.0.1 → git_bot_feedback-0.2.0}/Cargo.lock +2 -2
  5. {git_bot_feedback-0.0.1 → git_bot_feedback-0.2.0}/Cargo.toml +13 -5
  6. git_bot_feedback-0.2.0/LICENSE +165 -0
  7. {git_bot_feedback-0.0.1 → git_bot_feedback-0.2.0}/PKG-INFO +16 -10
  8. {git_bot_feedback-0.0.1 → git_bot_feedback-0.2.0}/README.md +21 -8
  9. {git_bot_feedback-0.0.1/bindings/python → git_bot_feedback-0.2.0}/README.rst +14 -8
  10. {git_bot_feedback-0.0.1 → git_bot_feedback-0.2.0/bindings/python}/CHANGELOG.md +48 -3
  11. {git_bot_feedback-0.0.1 → git_bot_feedback-0.2.0}/bindings/python/Cargo.toml +5 -5
  12. {git_bot_feedback-0.0.1 → git_bot_feedback-0.2.0/bindings/python}/README.rst +14 -8
  13. {git_bot_feedback-0.0.1 → git_bot_feedback-0.2.0}/pyproject.toml +1 -2
  14. git_bot_feedback-0.2.0/src/client/common.rs +30 -0
  15. git_bot_feedback-0.2.0/src/client/gitea/mod.rs +302 -0
  16. git_bot_feedback-0.2.0/src/client/gitea/serde_structs.rs +105 -0
  17. git_bot_feedback-0.2.0/src/client/gitea/specific_api.rs +437 -0
  18. {git_bot_feedback-0.0.1 → git_bot_feedback-0.2.0}/src/client/github/graphql.rs +2 -3
  19. {git_bot_feedback-0.0.1 → git_bot_feedback-0.2.0}/src/client/github/mod.rs +15 -5
  20. {git_bot_feedback-0.0.1 → git_bot_feedback-0.2.0}/src/client/github/serde_structs.rs +0 -27
  21. {git_bot_feedback-0.0.1 → git_bot_feedback-0.2.0}/src/client/github/specific_api.rs +5 -9
  22. {git_bot_feedback-0.0.1 → git_bot_feedback-0.2.0}/src/client/mod.rs +50 -4
  23. {git_bot_feedback-0.0.1 → git_bot_feedback-0.2.0}/src/error.rs +7 -1
  24. {git_bot_feedback-0.0.1 → git_bot_feedback-0.2.0}/src/file_utils/file_filter.rs +1 -1
  25. {git_bot_feedback-0.0.1 → git_bot_feedback-0.2.0}/src/file_utils/mod.rs +3 -0
  26. {git_bot_feedback-0.0.1 → git_bot_feedback-0.2.0}/src/git_diff.rs +30 -12
  27. {git_bot_feedback-0.0.1 → git_bot_feedback-0.2.0}/src/lib.rs +7 -0
  28. git_bot_feedback-0.0.1/LICENSE +0 -674
  29. {git_bot_feedback-0.0.1 → git_bot_feedback-0.2.0}/.gitignore +0 -0
  30. {git_bot_feedback-0.0.1 → git_bot_feedback-0.2.0}/CONTRIBUTING.md +0 -0
  31. {git_bot_feedback-0.0.1 → git_bot_feedback-0.2.0}/bindings/python/git_bot_feedback.pyi +0 -0
  32. {git_bot_feedback-0.0.1 → git_bot_feedback-0.2.0}/bindings/python/src/lib.rs +0 -0
  33. {git_bot_feedback-0.0.1 → git_bot_feedback-0.2.0}/bindings/python/src/wrapper.rs +0 -0
  34. {git_bot_feedback-0.0.1 → git_bot_feedback-0.2.0}/build.rs +0 -0
  35. {git_bot_feedback-0.0.1 → git_bot_feedback-0.2.0}/codecov.yml +0 -0
  36. {git_bot_feedback-0.0.1 → git_bot_feedback-0.2.0}/cspell.config.yml +0 -0
  37. {git_bot_feedback-0.0.1 → git_bot_feedback-0.2.0}/docs/API/client.rst +0 -0
  38. {git_bot_feedback-0.0.1 → git_bot_feedback-0.2.0}/docs/API/file-annotations.rst +0 -0
  39. {git_bot_feedback-0.0.1 → git_bot_feedback-0.2.0}/docs/API/file-changes.rst +0 -0
  40. {git_bot_feedback-0.0.1 → git_bot_feedback-0.2.0}/docs/API/index.rst +0 -0
  41. {git_bot_feedback-0.0.1 → git_bot_feedback-0.2.0}/docs/API/output-variables.rst +0 -0
  42. {git_bot_feedback-0.0.1 → git_bot_feedback-0.2.0}/docs/API/pr-reviews.rst +0 -0
  43. {git_bot_feedback-0.0.1 → git_bot_feedback-0.2.0}/docs/API/thread-comments.rst +0 -0
  44. {git_bot_feedback-0.0.1 → git_bot_feedback-0.2.0}/docs/_static/favicon.ico +0 -0
  45. {git_bot_feedback-0.0.1 → git_bot_feedback-0.2.0}/docs/_static/logo.png +0 -0
  46. {git_bot_feedback-0.0.1 → git_bot_feedback-0.2.0}/docs/conf.py +0 -0
  47. {git_bot_feedback-0.0.1 → git_bot_feedback-0.2.0}/docs/index.rst +0 -0
  48. {git_bot_feedback-0.0.1 → git_bot_feedback-0.2.0}/docs/logo.xcf +0 -0
  49. {git_bot_feedback-0.0.1 → git_bot_feedback-0.2.0}/git_bot_feedback.pyi +0 -0
  50. {git_bot_feedback-0.0.1 → git_bot_feedback-0.2.0}/nurfile +0 -0
  51. {git_bot_feedback-0.0.1 → git_bot_feedback-0.2.0}/src/client/local.rs +0 -0
  52. {git_bot_feedback-0.0.1 → git_bot_feedback-0.2.0}/src/comments/mod.rs +0 -0
  53. {git_bot_feedback-0.0.1 → git_bot_feedback-0.2.0}/src/comments/review_comments.rs +0 -0
  54. {git_bot_feedback-0.0.1 → git_bot_feedback-0.2.0}/src/comments/thread_comments.rs +0 -0
  55. {git_bot_feedback-0.0.1 → git_bot_feedback-0.2.0}/src/file_annotations.rs +0 -0
  56. {git_bot_feedback-0.0.1 → git_bot_feedback-0.2.0}/src/output_variable.rs +0 -0
  57. {git_bot_feedback-0.0.1 → git_bot_feedback-0.2.0}/uv.lock +0 -0
@@ -4,6 +4,7 @@
4
4
  # Explicitly declare text files you want to always be normalized and converted
5
5
  # to native line endings on checkout.
6
6
  *.py text eol=lf
7
+ *.pyi text eol=lf
7
8
  *.css text eol=lf
8
9
  *.md text eol=lf
9
10
  *.rst text eol=lf
@@ -5,17 +5,20 @@ repos:
5
5
  rev: v6.0.0
6
6
  hooks:
7
7
  - id: trailing-whitespace
8
+ exclude: ^tests/assets/.*.diff$
8
9
  - id: end-of-file-fixer
10
+ exclude: ^tests/assets/.*.diff$
9
11
  - id: check-yaml
10
12
  - id: check-toml
11
13
  - id: check-added-large-files
12
14
  - id: mixed-line-ending
13
15
  args: ['--fix=lf']
16
+ exclude: ^tests/assets/.*.diff$
14
17
  - repo: https://github.com/streetsidesoftware/cspell-cli
15
18
  rev: v10.0.1
16
19
  hooks:
17
20
  - id: cspell
18
- exclude: CHANGELOG.md$
21
+ exclude: CHANGELOG.md$|.*\.diff$
19
22
  - repo: https://github.com/astral-sh/ruff-pre-commit
20
23
  # Ruff version.
21
24
  rev: v0.15.20
@@ -6,7 +6,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
  <!-- markdownlint-disable MD024 -->
8
8
 
9
- ## [git-bot-feedback-py/v0.0.1] - 2026-06-29
9
+ ## [git-bot-feedback/v0.8.0] - 2026-07-01
10
10
 
11
11
  ### <!-- 1 --> 🚀 Added
12
12
 
@@ -25,6 +25,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
25
25
  - Revise `FileFilter::walk_dir()` by @2bndy5 in [#78](https://github.com/2bndy5/git-bot-feedback/pull/78)
26
26
  - Strip parent path from `walk_dir()` results by @2bndy5 in [#83](https://github.com/2bndy5/git-bot-feedback/pull/83)
27
27
  - Add python bindings by @2bndy5 in [#90](https://github.com/2bndy5/git-bot-feedback/pull/90)
28
+ - Add Gitea support by @2bndy5 in [#94](https://github.com/2bndy5/git-bot-feedback/pull/94)
28
29
 
29
30
  ### <!-- 10 --> 💥 Breaking Changes
30
31
 
@@ -40,18 +41,22 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
40
41
  - Honor `ignore_index` when asserted by @2bndy5 in [#75](https://github.com/2bndy5/git-bot-feedback/pull/75)
41
42
  - Strip relative path from `FileFilter::walk_dir()` results by @2bndy5 in [#84](https://github.com/2bndy5/git-bot-feedback/pull/84)
42
43
  - Use correct name of PR review state that is "COMMENTED" by @2bndy5 in [#89](https://github.com/2bndy5/git-bot-feedback/pull/89)
44
+ - Fail on unsuccessful return code from request for file changes by @2bndy5 in [#95](https://github.com/2bndy5/git-bot-feedback/pull/95)
45
+ - Trim line endings from file names when parsing diff strings by @2bndy5 in [#97](https://github.com/2bndy5/git-bot-feedback/pull/97)
46
+ - Fail on parsing erroneous diff by @2bndy5 in [#98](https://github.com/2bndy5/git-bot-feedback/pull/98)
47
+ - Move option's value instead of cloning it by @2bndy5 in [#99](https://github.com/2bndy5/git-bot-feedback/pull/99)
43
48
 
44
- ### <!-- 6 --> 📦 Dependency updates
49
+ ### <!-- 8 --> 📝 Documentation
45
50
 
46
- - Bump version to git-bot-feedback/v0.7.0 by @2bndy5 in [`89edac4`](https://github.com/2bndy5/git-bot-feedback/commit/89edac47aa122fcdc67d3dd8b5c83d6228ba613e)
51
+ - Expand on some methods' doc comments by @2bndy5 in [#96](https://github.com/2bndy5/git-bot-feedback/pull/96)
47
52
 
48
53
  ### <!-- 9 --> 🗨️ Changed
49
54
 
50
55
  - Revise `FileAnnotations` impl by @2bndy5 in [#64](https://github.com/2bndy5/git-bot-feedback/pull/64)
51
56
 
52
- [git-bot-feedback-py/v0.0.1]: https://github.com/2bndy5/git-bot-feedback/compare/4d46f96eddc6f512bb7bf3600d3f9d5490ef004f...git-bot-feedback-py/v0.0.1
57
+ [git-bot-feedback/v0.8.0]: https://github.com/2bndy5/git-bot-feedback/compare/git-bot-feedback/v0.7.1...git-bot-feedback/v0.8.0
53
58
 
54
- Full commit diff: [`4d46f96...git-bot-feedback-py/v0.0.1`][git-bot-feedback-py/v0.0.1]
59
+ Full commit diff: [`git-bot-feedback/v0.7.1...git-bot-feedback/v0.8.0`][git-bot-feedback/v0.8.0]
55
60
 
56
61
 
57
62
  <!-- generated by git-cliff -->
@@ -400,7 +400,7 @@ dependencies = [
400
400
 
401
401
  [[package]]
402
402
  name = "git-bot-feedback"
403
- version = "0.7.0"
403
+ version = "0.8.0"
404
404
  dependencies = [
405
405
  "async-trait",
406
406
  "chrono",
@@ -420,7 +420,7 @@ dependencies = [
420
420
 
421
421
  [[package]]
422
422
  name = "git-bot-feedback-py"
423
- version = "0.0.1"
423
+ version = "0.2.0"
424
424
  dependencies = [
425
425
  "git-bot-feedback",
426
426
  "pyo3",
@@ -1,6 +1,11 @@
1
1
  [workspace]
2
2
  members = ["bindings/*"]
3
3
 
4
+ [workspace.package]
5
+ edition = "2024"
6
+ repository = "https://github.com/2bndy5/git-bot-feedback"
7
+ license = "LGPL-3.0-or-later"
8
+
4
9
  [workspace.dependencies]
5
10
  pyo3 = { version = "0.29.0", features = ["extension-module"] }
6
11
  tokio = { version = "1", features = ["macros", "rt-multi-thread"] }
@@ -16,10 +21,10 @@ features = ["http2", "charset", "system-proxy"]
16
21
  [package]
17
22
  name = "git-bot-feedback"
18
23
  description = "A library designed for CI tools that posts comments on a Pull Request."
19
- version = "0.7.0"
20
- edition = "2024"
21
- repository = "https://github.com/2bndy5/git-bot-feedback"
22
- license = "GPL-3.0"
24
+ version = "0.8.0"
25
+ edition.workspace = true
26
+ license.workspace = true
27
+ repository.workspace = true
23
28
 
24
29
  [dependencies]
25
30
  async-trait = "0.1.89"
@@ -53,8 +58,11 @@ pyo3 = ["dep:pyo3"]
53
58
  # GitHub implementation/support
54
59
  github = []
55
60
 
61
+ # Gitea implementation/support
62
+ gitea = []
63
+
56
64
  # features enabled by default
57
- default = ["github"]
65
+ default = ["github", "gitea"]
58
66
 
59
67
  # optional feature to silence a compiler error if/when
60
68
  # no features enable any git server implementations
@@ -0,0 +1,165 @@
1
+ GNU LESSER GENERAL PUBLIC LICENSE
2
+ Version 3, 29 June 2007
3
+
4
+ Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
5
+ Everyone is permitted to copy and distribute verbatim copies
6
+ of this license document, but changing it is not allowed.
7
+
8
+
9
+ This version of the GNU Lesser General Public License incorporates
10
+ the terms and conditions of version 3 of the GNU General Public
11
+ License, supplemented by the additional permissions listed below.
12
+
13
+ 0. Additional Definitions.
14
+
15
+ As used herein, "this License" refers to version 3 of the GNU Lesser
16
+ General Public License, and the "GNU GPL" refers to version 3 of the GNU
17
+ General Public License.
18
+
19
+ "The Library" refers to a covered work governed by this License,
20
+ other than an Application or a Combined Work as defined below.
21
+
22
+ An "Application" is any work that makes use of an interface provided
23
+ by the Library, but which is not otherwise based on the Library.
24
+ Defining a subclass of a class defined by the Library is deemed a mode
25
+ of using an interface provided by the Library.
26
+
27
+ A "Combined Work" is a work produced by combining or linking an
28
+ Application with the Library. The particular version of the Library
29
+ with which the Combined Work was made is also called the "Linked
30
+ Version".
31
+
32
+ The "Minimal Corresponding Source" for a Combined Work means the
33
+ Corresponding Source for the Combined Work, excluding any source code
34
+ for portions of the Combined Work that, considered in isolation, are
35
+ based on the Application, and not on the Linked Version.
36
+
37
+ The "Corresponding Application Code" for a Combined Work means the
38
+ object code and/or source code for the Application, including any data
39
+ and utility programs needed for reproducing the Combined Work from the
40
+ Application, but excluding the System Libraries of the Combined Work.
41
+
42
+ 1. Exception to Section 3 of the GNU GPL.
43
+
44
+ You may convey a covered work under sections 3 and 4 of this License
45
+ without being bound by section 3 of the GNU GPL.
46
+
47
+ 2. Conveying Modified Versions.
48
+
49
+ If you modify a copy of the Library, and, in your modifications, a
50
+ facility refers to a function or data to be supplied by an Application
51
+ that uses the facility (other than as an argument passed when the
52
+ facility is invoked), then you may convey a copy of the modified
53
+ version:
54
+
55
+ a) under this License, provided that you make a good faith effort to
56
+ ensure that, in the event an Application does not supply the
57
+ function or data, the facility still operates, and performs
58
+ whatever part of its purpose remains meaningful, or
59
+
60
+ b) under the GNU GPL, with none of the additional permissions of
61
+ this License applicable to that copy.
62
+
63
+ 3. Object Code Incorporating Material from Library Header Files.
64
+
65
+ The object code form of an Application may incorporate material from
66
+ a header file that is part of the Library. You may convey such object
67
+ code under terms of your choice, provided that, if the incorporated
68
+ material is not limited to numerical parameters, data structure
69
+ layouts and accessors, or small macros, inline functions and templates
70
+ (ten or fewer lines in length), you do both of the following:
71
+
72
+ a) Give prominent notice with each copy of the object code that the
73
+ Library is used in it and that the Library and its use are
74
+ covered by this License.
75
+
76
+ b) Accompany the object code with a copy of the GNU GPL and this license
77
+ document.
78
+
79
+ 4. Combined Works.
80
+
81
+ You may convey a Combined Work under terms of your choice that,
82
+ taken together, effectively do not restrict modification of the
83
+ portions of the Library contained in the Combined Work and reverse
84
+ engineering for debugging such modifications, if you also do each of
85
+ the following:
86
+
87
+ a) Give prominent notice with each copy of the Combined Work that
88
+ the Library is used in it and that the Library and its use are
89
+ covered by this License.
90
+
91
+ b) Accompany the Combined Work with a copy of the GNU GPL and this license
92
+ document.
93
+
94
+ c) For a Combined Work that displays copyright notices during
95
+ execution, include the copyright notice for the Library among
96
+ these notices, as well as a reference directing the user to the
97
+ copies of the GNU GPL and this license document.
98
+
99
+ d) Do one of the following:
100
+
101
+ 0) Convey the Minimal Corresponding Source under the terms of this
102
+ License, and the Corresponding Application Code in a form
103
+ suitable for, and under terms that permit, the user to
104
+ recombine or relink the Application with a modified version of
105
+ the Linked Version to produce a modified Combined Work, in the
106
+ manner specified by section 6 of the GNU GPL for conveying
107
+ Corresponding Source.
108
+
109
+ 1) Use a suitable shared library mechanism for linking with the
110
+ Library. A suitable mechanism is one that (a) uses at run time
111
+ a copy of the Library already present on the user's computer
112
+ system, and (b) will operate properly with a modified version
113
+ of the Library that is interface-compatible with the Linked
114
+ Version.
115
+
116
+ e) Provide Installation Information, but only if you would otherwise
117
+ be required to provide such information under section 6 of the
118
+ GNU GPL, and only to the extent that such information is
119
+ necessary to install and execute a modified version of the
120
+ Combined Work produced by recombining or relinking the
121
+ Application with a modified version of the Linked Version. (If
122
+ you use option 4d0, the Installation Information must accompany
123
+ the Minimal Corresponding Source and Corresponding Application
124
+ Code. If you use option 4d1, you must provide the Installation
125
+ Information in the manner specified by section 6 of the GNU GPL
126
+ for conveying Corresponding Source.)
127
+
128
+ 5. Combined Libraries.
129
+
130
+ You may place library facilities that are a work based on the
131
+ Library side by side in a single library together with other library
132
+ facilities that are not Applications and are not covered by this
133
+ License, and convey such a combined library under terms of your
134
+ choice, if you do both of the following:
135
+
136
+ a) Accompany the combined library with a copy of the same work based
137
+ on the Library, uncombined with any other library facilities,
138
+ conveyed under the terms of this License.
139
+
140
+ b) Give prominent notice with the combined library that part of it
141
+ is a work based on the Library, and explaining where to find the
142
+ accompanying uncombined form of the same work.
143
+
144
+ 6. Revised Versions of the GNU Lesser General Public License.
145
+
146
+ The Free Software Foundation may publish revised and/or new versions
147
+ of the GNU Lesser General Public License from time to time. Such new
148
+ versions will be similar in spirit to the present version, but may
149
+ differ in detail to address new problems or concerns.
150
+
151
+ Each version is given a distinguishing version number. If the
152
+ Library as you received it specifies that a certain numbered version
153
+ of the GNU Lesser General Public License "or any later version"
154
+ applies to it, you have the option of following the terms and
155
+ conditions either of that published version or of any later version
156
+ published by the Free Software Foundation. If the Library as you
157
+ received it does not specify a version number of the GNU Lesser
158
+ General Public License, you may choose any version of the GNU Lesser
159
+ General Public License ever published by the Free Software Foundation.
160
+
161
+ If the Library as you received it specifies that a proxy can decide
162
+ whether future versions of the GNU Lesser General Public License shall
163
+ apply, that proxy's public statement of acceptance of any version is
164
+ permanent authorization for you to choose that version for the
165
+ Library.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: git-bot-feedback
3
- Version: 0.0.1
3
+ Version: 0.2.0
4
4
  Classifier: Development Status :: 5 - Production/Stable
5
5
  Classifier: Intended Audience :: Developers
6
6
  Classifier: Intended Audience :: System Administrators
@@ -17,7 +17,7 @@ Classifier: Programming Language :: Python :: Implementation :: PyPy
17
17
  Summary: A Python library (written in Rust) designed for CI tools to easily submit feedback on a git server.
18
18
  Keywords: git,client,github,bot,rust
19
19
  Author-email: Brendan Doherty <2bndy5@gmail.com>
20
- License: GPL-3.0-or-later
20
+ License: LGPL-3.0-or-later
21
21
  Requires-Python: >=3.10
22
22
  Description-Content-Type: text/x-rst; charset=UTF-8
23
23
  Project-URL: source, https://github.com/2bndy5/git-bot-feedback
@@ -51,33 +51,39 @@ loop is required.
51
51
  Supported git servers
52
52
  ---------------------
53
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.
54
+ This project is designed to easily add support for various git servers.
56
55
  The following is just a list of git servers that are planned (in order or priority).
57
56
 
58
57
  - GitHub
59
58
  - GitLab
60
59
  - Gitea
60
+
61
+ Gitea does not support
62
+
63
+ - posting thread comments for commits (push events)
64
+ - programmatically deleting a PR reviews' individual comments, rather we can
65
+ only resolve them (currently). However, deleting an entire PR review is supported.
61
66
  - BitBucket
62
67
 
63
- GPL license
64
- -----------
68
+ Currently, only Github and Gitea are supported.
69
+
70
+ LGPL license
71
+ ------------
65
72
 
66
- .. _GPL-3.0-or-later: https://github.com/2bndy5/git-bot-feedback/blob/main/LICENSE
73
+ .. _LGPL-3.0-or-later: https://github.com/2bndy5/git-bot-feedback/blob/main/LICENSE
67
74
 
68
- This project is licensed under `GPL-3.0-or-later`_.
75
+ This project is licensed under `LGPL-3.0-or-later`_.
69
76
 
70
77
  Since this library ultimately requires write access to
71
78
  users' projects (to allow posting comments),
72
79
  it could easily be modified with malicious intent.
73
80
 
74
- By using the `GPL-3.0-or-later`_ license,
81
+ By using the `LGPL-3.0-or-later`_ license,
75
82
  we can offer some assurance and help safeguard end-users' data/privacy
76
83
  because the following conditions must be met:
77
84
 
78
85
  - the source code is publicly available
79
86
  - any redistributed forms must state their modifications (if any)
80
- - any redistributed forms must use the same `GPL-3.0-or-later`_ license
81
87
 
82
88
  .. |docs-badge| image:: https://img.shields.io/github/deployments/2bndy5/git-bot-feedback/github-pages?logo=github&label=docs
83
89
  :alt: GitHub pages
@@ -32,30 +32,43 @@ consumers to choose the TLS backend of their choice; see [reqwest's features][re
32
32
 
33
33
  ## Supported git servers
34
34
 
35
- Initially this project os designed to work with GitHub.
36
- But the API is designed to easily add support for other git servers.
35
+ This project is designed to easily add support for various git servers.
37
36
  The following is just a list of git servers that are planned (in order or priority).
38
37
 
39
38
  - [x] GitHub
40
39
  - [ ] GitLab
41
- - [ ] Gitea
40
+ - [x] Gitea
41
+
42
+ Gitea does not support
43
+
44
+ - posting thread comments for commits (push events)
45
+ - programmatically deleting a PR reviews' individual comments,
46
+ rather we can only resolve them (currently).
47
+ However, deleting an entire PR review is supported.
42
48
  - [ ] BitBucket
43
49
 
44
- ## GPL license
50
+ ### Optional support
51
+
52
+ Each supported implementation of the above git servers can be controlled via
53
+ [cargo features][dep-features]. They are enabled by default.
54
+
55
+ - `github` enables support of GitHub implementation
56
+ - `gitea` enables support of Gitea implementation
57
+
58
+ ## LGPL license
45
59
 
46
- This project is licensed under [GPL-3.0-or-later].
60
+ This project is licensed under [LGPL-3.0-or-later].
47
61
 
48
62
  Since this library ultimately requires write access to
49
63
  users' projects (to allow posting comments),
50
64
  it could easily be modified with malicious intent.
51
65
 
52
- By using the [GPL-3.0-or-later] license,
66
+ By using the [LGPL-3.0-or-later] license,
53
67
  we can offer some assurance and help safeguard end-users' data/privacy
54
68
  because the following conditions must be met:
55
69
 
56
70
  - the source code is publicly available
57
71
  - any redistributed forms must state their modifications (if any)
58
- - any redistributed forms must use the same [GPL-3.0-or-later] license
59
72
 
60
73
  [codecov-badge]: https://codecov.io/gh/2bndy5/git-bot-feedback/graph/badge.svg?token=T3FRIJ64W0
61
74
  [codecov-link]: https://app.codecov.io/gh/2bndy5/git-bot-feedback
@@ -67,6 +80,6 @@ because the following conditions must be met:
67
80
  [docs-rs-link]: https://docs.rs/git-bot-feedback
68
81
  [dep-features]: https://doc.rust-lang.org/cargo/reference/features.html#dependency-features
69
82
  [reqwest-docs]: https://docs.rs/reqwest/latest/reqwest/#optional-features
70
- [GPL-3.0-or-later]: https://github.com/2bndy5/git-bot-feedback/blob/main/LICENSE
83
+ [LGPL-3.0-or-later]: https://github.com/2bndy5/git-bot-feedback/blob/main/LICENSE
71
84
  [license-badge]: https://img.shields.io/github/license/2bndy5/git-bot-feedback
72
85
  [license-link]: https://github.com/2bndy5/git-bot-feedback/blob/main/LICENSE
@@ -26,33 +26,39 @@ loop is required.
26
26
  Supported git servers
27
27
  ---------------------
28
28
 
29
- Initially, this project is designed to work with GitHub.
30
- But the API is designed to easily add support for other git servers.
29
+ This project is designed to easily add support for various git servers.
31
30
  The following is just a list of git servers that are planned (in order or priority).
32
31
 
33
32
  - GitHub
34
33
  - GitLab
35
34
  - Gitea
35
+
36
+ Gitea does not support
37
+
38
+ - posting thread comments for commits (push events)
39
+ - programmatically deleting a PR reviews' individual comments, rather we can
40
+ only resolve them (currently). However, deleting an entire PR review is supported.
36
41
  - BitBucket
37
42
 
38
- GPL license
39
- -----------
43
+ Currently, only Github and Gitea are supported.
44
+
45
+ LGPL license
46
+ ------------
40
47
 
41
- .. _GPL-3.0-or-later: https://github.com/2bndy5/git-bot-feedback/blob/main/LICENSE
48
+ .. _LGPL-3.0-or-later: https://github.com/2bndy5/git-bot-feedback/blob/main/LICENSE
42
49
 
43
- This project is licensed under `GPL-3.0-or-later`_.
50
+ This project is licensed under `LGPL-3.0-or-later`_.
44
51
 
45
52
  Since this library ultimately requires write access to
46
53
  users' projects (to allow posting comments),
47
54
  it could easily be modified with malicious intent.
48
55
 
49
- By using the `GPL-3.0-or-later`_ license,
56
+ By using the `LGPL-3.0-or-later`_ license,
50
57
  we can offer some assurance and help safeguard end-users' data/privacy
51
58
  because the following conditions must be met:
52
59
 
53
60
  - the source code is publicly available
54
61
  - any redistributed forms must state their modifications (if any)
55
- - any redistributed forms must use the same `GPL-3.0-or-later`_ license
56
62
 
57
63
  .. |docs-badge| image:: https://img.shields.io/github/deployments/2bndy5/git-bot-feedback/github-pages?logo=github&label=docs
58
64
  :alt: GitHub pages
@@ -6,7 +6,47 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
  <!-- markdownlint-disable MD024 -->
8
8
 
9
- ## [git-bot-feedback/v0.7.0] - 2026-06-29
9
+ ## [git-bot-feedback-py/v0.2.0] - 2026-07-01
10
+
11
+ ### <!-- 1 --> 🚀 Added
12
+
13
+ - Add Gitea support by @2bndy5 in [#94](https://github.com/2bndy5/git-bot-feedback/pull/94)
14
+
15
+ ### <!-- 4 --> 🛠️ Fixed
16
+
17
+ - Fail on unsuccessful return code from request for file changes by @2bndy5 in [#95](https://github.com/2bndy5/git-bot-feedback/pull/95)
18
+ - Trim line endings from file names when parsing diff strings by @2bndy5 in [#97](https://github.com/2bndy5/git-bot-feedback/pull/97)
19
+ - Fail on parsing erroneous diff by @2bndy5 in [#98](https://github.com/2bndy5/git-bot-feedback/pull/98)
20
+ - Move option's value instead of cloning it by @2bndy5 in [#99](https://github.com/2bndy5/git-bot-feedback/pull/99)
21
+
22
+ ### <!-- 6 --> 📦 Dependency updates
23
+
24
+ - Bump version to git-bot-feedback/v0.8.0 by @2bndy5 in [`d6070e7`](https://github.com/2bndy5/git-bot-feedback/commit/d6070e7d41cdc8a1c01c5f3a69a16aa8bdff0d25)
25
+
26
+ ### <!-- 8 --> 📝 Documentation
27
+
28
+ - Expand on some methods' doc comments by @2bndy5 in [#96](https://github.com/2bndy5/git-bot-feedback/pull/96)
29
+
30
+ [git-bot-feedback-py/v0.2.0]: https://github.com/2bndy5/git-bot-feedback/compare/git-bot-feedback-py/v0.1.0...git-bot-feedback-py/v0.2.0
31
+
32
+ Full commit diff: [`git-bot-feedback-py/v0.1.0...git-bot-feedback-py/v0.2.0`][git-bot-feedback-py/v0.2.0]
33
+
34
+ ## [git-bot-feedback-py/v0.1.0] - 2026-06-29
35
+
36
+ ### <!-- 6 --> 📦 Dependency updates
37
+
38
+ - Bump version to git-bot-feedback/v0.7.1 by @2bndy5 in [`5011a04`](https://github.com/2bndy5/git-bot-feedback/commit/5011a04d4806b08e54a1ed2ba456badb7622e682)
39
+ - Bump version to git-bot-feedback-py/v0.1.0 by @2bndy5 in [`c02c181`](https://github.com/2bndy5/git-bot-feedback/commit/c02c181b8ef8f5c3f825c334e02af2765c2a5cea)
40
+
41
+ ### <!-- 9 --> 🗨️ Changed
42
+
43
+ - Change to LGPL-3.0-or-later license by @2bndy5 in [#93](https://github.com/2bndy5/git-bot-feedback/pull/93)
44
+
45
+ [git-bot-feedback-py/v0.1.0]: https://github.com/2bndy5/git-bot-feedback/compare/git-bot-feedback-py/v0.0.1...git-bot-feedback-py/v0.1.0
46
+
47
+ Full commit diff: [`git-bot-feedback-py/v0.0.1...git-bot-feedback-py/v0.1.0`][git-bot-feedback-py/v0.1.0]
48
+
49
+ ## [git-bot-feedback-py/v0.0.1] - 2026-06-29
10
50
 
11
51
  ### <!-- 1 --> 🚀 Added
12
52
 
@@ -41,13 +81,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
41
81
  - Strip relative path from `FileFilter::walk_dir()` results by @2bndy5 in [#84](https://github.com/2bndy5/git-bot-feedback/pull/84)
42
82
  - Use correct name of PR review state that is "COMMENTED" by @2bndy5 in [#89](https://github.com/2bndy5/git-bot-feedback/pull/89)
43
83
 
84
+ ### <!-- 6 --> 📦 Dependency updates
85
+
86
+ - Bump version to git-bot-feedback/v0.7.0 by @2bndy5 in [`89edac4`](https://github.com/2bndy5/git-bot-feedback/commit/89edac47aa122fcdc67d3dd8b5c83d6228ba613e)
87
+ - Bump version to git-bot-feedback-py/v0.0.1 by @2bndy5 in [`201ceba`](https://github.com/2bndy5/git-bot-feedback/commit/201cebaf09433d557f402d896f0f2a4378d91700)
88
+
44
89
  ### <!-- 9 --> 🗨️ Changed
45
90
 
46
91
  - Revise `FileAnnotations` impl by @2bndy5 in [#64](https://github.com/2bndy5/git-bot-feedback/pull/64)
47
92
 
48
- [git-bot-feedback/v0.7.0]: https://github.com/2bndy5/git-bot-feedback/compare/git-bot-feedback/v0.6.1...git-bot-feedback/v0.7.0
93
+ [git-bot-feedback-py/v0.0.1]: https://github.com/2bndy5/git-bot-feedback/compare/4d46f96eddc6f512bb7bf3600d3f9d5490ef004f...git-bot-feedback-py/v0.0.1
49
94
 
50
- Full commit diff: [`git-bot-feedback/v0.6.1...git-bot-feedback/v0.7.0`][git-bot-feedback/v0.7.0]
95
+ Full commit diff: [`4d46f96...git-bot-feedback-py/v0.0.1`][git-bot-feedback-py/v0.0.1]
51
96
 
52
97
 
53
98
  <!-- generated by git-cliff -->
@@ -1,11 +1,11 @@
1
1
  [package]
2
2
  name = "git-bot-feedback-py"
3
- version = "0.0.1"
4
- edition = "2024"
5
- license = "GPL-3.0-or-later"
3
+ version = "0.2.0"
4
+ edition.workspace = true
5
+ license.workspace = true
6
+ repository.workspace = true
6
7
  description = "A Python library (written in Rust) designed for CI tools to easily submit feedback on a git server."
7
8
  documentation = "https://2bndy5.github.io/git-bot-feedback"
8
- repository = "https://github.com/2bndy5/git-bot-feedback"
9
9
  publish = false
10
10
 
11
11
  [lib]
@@ -14,7 +14,7 @@ crate-type = ["cdylib"] # spell-checker: disable-line
14
14
  path = "src/lib.rs"
15
15
 
16
16
  [dependencies]
17
- git-bot-feedback = { path = "../..", version = "0.7.0", features = ["file-changes", "pyo3"] }
17
+ git-bot-feedback = { path = "../..", version = "0.8.0", features = ["file-changes", "pyo3"] }
18
18
  pyo3 = { workspace = true }
19
19
  pyo3-async-runtimes = { version = "0.29.0", features = ["tokio-runtime"] }
20
20
  pyo3-log = "0.13.4"
@@ -26,33 +26,39 @@ loop is required.
26
26
  Supported git servers
27
27
  ---------------------
28
28
 
29
- Initially, this project is designed to work with GitHub.
30
- But the API is designed to easily add support for other git servers.
29
+ This project is designed to easily add support for various git servers.
31
30
  The following is just a list of git servers that are planned (in order or priority).
32
31
 
33
32
  - GitHub
34
33
  - GitLab
35
34
  - Gitea
35
+
36
+ Gitea does not support
37
+
38
+ - posting thread comments for commits (push events)
39
+ - programmatically deleting a PR reviews' individual comments, rather we can
40
+ only resolve them (currently). However, deleting an entire PR review is supported.
36
41
  - BitBucket
37
42
 
38
- GPL license
39
- -----------
43
+ Currently, only Github and Gitea are supported.
44
+
45
+ LGPL license
46
+ ------------
40
47
 
41
- .. _GPL-3.0-or-later: https://github.com/2bndy5/git-bot-feedback/blob/main/LICENSE
48
+ .. _LGPL-3.0-or-later: https://github.com/2bndy5/git-bot-feedback/blob/main/LICENSE
42
49
 
43
- This project is licensed under `GPL-3.0-or-later`_.
50
+ This project is licensed under `LGPL-3.0-or-later`_.
44
51
 
45
52
  Since this library ultimately requires write access to
46
53
  users' projects (to allow posting comments),
47
54
  it could easily be modified with malicious intent.
48
55
 
49
- By using the `GPL-3.0-or-later`_ license,
56
+ By using the `LGPL-3.0-or-later`_ license,
50
57
  we can offer some assurance and help safeguard end-users' data/privacy
51
58
  because the following conditions must be met:
52
59
 
53
60
  - the source code is publicly available
54
61
  - any redistributed forms must state their modifications (if any)
55
- - any redistributed forms must use the same `GPL-3.0-or-later`_ license
56
62
 
57
63
  .. |docs-badge| image:: https://img.shields.io/github/deployments/2bndy5/git-bot-feedback/github-pages?logo=github&label=docs
58
64
  :alt: GitHub pages
@@ -4,11 +4,10 @@ build-backend = "maturin"
4
4
 
5
5
  [project]
6
6
  name = "git-bot-feedback"
7
- dynamic = ["version"]
7
+ dynamic = ["version", "license"]
8
8
  description = "A Python library (written in Rust) designed for CI tools to easily submit feedback on a git server."
9
9
  readme = "README.rst"
10
10
  keywords = ["git", "client", "github", "bot", "rust"]
11
- license = {text = "GPL-3.0-or-later"}
12
11
  requires-python = ">=3.10"
13
12
  authors = [
14
13
  # spell-checker: disable-next-line
@@ -0,0 +1,30 @@
1
+ #![cfg(any(feature = "gitea", feature = "github"))]
2
+
3
+ use serde::Deserialize;
4
+
5
+ #[derive(Debug, Deserialize, PartialEq, Eq, Clone)]
6
+ #[serde(rename_all = "lowercase")]
7
+ pub enum PullRequestState {
8
+ Open,
9
+ Closed,
10
+ }
11
+
12
+ /// PR event payload.
13
+ #[derive(Debug, Deserialize, PartialEq, Clone)]
14
+ pub struct PullRequestEventPayload {
15
+ /// The Pull Request's info.
16
+ pub pull_request: PullRequestInfo,
17
+ }
18
+
19
+ /// A structure for deserializing a Pull Request's info from a response's json.
20
+ #[derive(Debug, Deserialize, PartialEq, Clone)]
21
+ pub struct PullRequestInfo {
22
+ /// Is this PR a draft?
23
+ pub draft: bool,
24
+ /// Is this PR locked?
25
+ pub locked: bool,
26
+ /// The Pull Request's number.
27
+ pub number: u64,
28
+ /// What is current state of this PR?
29
+ pub state: PullRequestState,
30
+ }