git-bot-feedback 0.2.5__tar.gz → 0.2.7__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 (56) hide show
  1. {git_bot_feedback-0.2.5 → git_bot_feedback-0.2.7}/CHANGELOG.md +5 -3
  2. {git_bot_feedback-0.2.5 → git_bot_feedback-0.2.7}/Cargo.lock +11 -11
  3. {git_bot_feedback-0.2.5 → git_bot_feedback-0.2.7}/Cargo.toml +1 -1
  4. {git_bot_feedback-0.2.5 → git_bot_feedback-0.2.7}/PKG-INFO +1 -1
  5. {git_bot_feedback-0.2.5 → git_bot_feedback-0.2.7}/bindings/python/CHANGELOG.md +30 -0
  6. {git_bot_feedback-0.2.5 → git_bot_feedback-0.2.7}/bindings/python/Cargo.toml +2 -2
  7. {git_bot_feedback-0.2.5 → git_bot_feedback-0.2.7/bindings/python}/git_bot_feedback.pyi +2 -0
  8. {git_bot_feedback-0.2.5 → git_bot_feedback-0.2.7}/bindings/python/src/wrapper.rs +23 -0
  9. {git_bot_feedback-0.2.5/bindings/python → git_bot_feedback-0.2.7}/git_bot_feedback.pyi +2 -0
  10. {git_bot_feedback-0.2.5 → git_bot_feedback-0.2.7}/src/client/github/mod.rs +5 -1
  11. {git_bot_feedback-0.2.5 → git_bot_feedback-0.2.7}/src/client/github/specific_api.rs +22 -1
  12. {git_bot_feedback-0.2.5 → git_bot_feedback-0.2.7}/.gitattributes +0 -0
  13. {git_bot_feedback-0.2.5 → git_bot_feedback-0.2.7}/.gitignore +0 -0
  14. {git_bot_feedback-0.2.5 → git_bot_feedback-0.2.7}/.pre-commit-config.yaml +0 -0
  15. {git_bot_feedback-0.2.5 → git_bot_feedback-0.2.7}/CONTRIBUTING.md +0 -0
  16. {git_bot_feedback-0.2.5 → git_bot_feedback-0.2.7}/LICENSE +0 -0
  17. {git_bot_feedback-0.2.5 → git_bot_feedback-0.2.7}/README.md +0 -0
  18. {git_bot_feedback-0.2.5 → git_bot_feedback-0.2.7}/README.rst +0 -0
  19. {git_bot_feedback-0.2.5 → git_bot_feedback-0.2.7}/bindings/python/README.rst +0 -0
  20. {git_bot_feedback-0.2.5 → git_bot_feedback-0.2.7}/bindings/python/src/lib.rs +0 -0
  21. {git_bot_feedback-0.2.5 → git_bot_feedback-0.2.7}/build.rs +0 -0
  22. {git_bot_feedback-0.2.5 → git_bot_feedback-0.2.7}/codecov.yml +0 -0
  23. {git_bot_feedback-0.2.5 → git_bot_feedback-0.2.7}/cspell.config.yml +0 -0
  24. {git_bot_feedback-0.2.5 → git_bot_feedback-0.2.7}/docs/API/client.rst +0 -0
  25. {git_bot_feedback-0.2.5 → git_bot_feedback-0.2.7}/docs/API/file-annotations.rst +0 -0
  26. {git_bot_feedback-0.2.5 → git_bot_feedback-0.2.7}/docs/API/file-changes.rst +0 -0
  27. {git_bot_feedback-0.2.5 → git_bot_feedback-0.2.7}/docs/API/index.rst +0 -0
  28. {git_bot_feedback-0.2.5 → git_bot_feedback-0.2.7}/docs/API/output-variables.rst +0 -0
  29. {git_bot_feedback-0.2.5 → git_bot_feedback-0.2.7}/docs/API/pr-reviews.rst +0 -0
  30. {git_bot_feedback-0.2.5 → git_bot_feedback-0.2.7}/docs/API/thread-comments.rst +0 -0
  31. {git_bot_feedback-0.2.5 → git_bot_feedback-0.2.7}/docs/_static/favicon.ico +0 -0
  32. {git_bot_feedback-0.2.5 → git_bot_feedback-0.2.7}/docs/_static/logo.png +0 -0
  33. {git_bot_feedback-0.2.5 → git_bot_feedback-0.2.7}/docs/conf.py +0 -0
  34. {git_bot_feedback-0.2.5 → git_bot_feedback-0.2.7}/docs/index.rst +0 -0
  35. {git_bot_feedback-0.2.5 → git_bot_feedback-0.2.7}/docs/logo.xcf +0 -0
  36. {git_bot_feedback-0.2.5 → git_bot_feedback-0.2.7}/nurfile +0 -0
  37. {git_bot_feedback-0.2.5 → git_bot_feedback-0.2.7}/pyproject.toml +0 -0
  38. {git_bot_feedback-0.2.5 → git_bot_feedback-0.2.7}/src/client/common.rs +0 -0
  39. {git_bot_feedback-0.2.5 → git_bot_feedback-0.2.7}/src/client/gitea/mod.rs +0 -0
  40. {git_bot_feedback-0.2.5 → git_bot_feedback-0.2.7}/src/client/gitea/serde_structs.rs +0 -0
  41. {git_bot_feedback-0.2.5 → git_bot_feedback-0.2.7}/src/client/gitea/specific_api.rs +0 -0
  42. {git_bot_feedback-0.2.5 → git_bot_feedback-0.2.7}/src/client/github/graphql.rs +0 -0
  43. {git_bot_feedback-0.2.5 → git_bot_feedback-0.2.7}/src/client/github/serde_structs.rs +0 -0
  44. {git_bot_feedback-0.2.5 → git_bot_feedback-0.2.7}/src/client/local.rs +0 -0
  45. {git_bot_feedback-0.2.5 → git_bot_feedback-0.2.7}/src/client/mod.rs +0 -0
  46. {git_bot_feedback-0.2.5 → git_bot_feedback-0.2.7}/src/comments/mod.rs +0 -0
  47. {git_bot_feedback-0.2.5 → git_bot_feedback-0.2.7}/src/comments/review_comments.rs +0 -0
  48. {git_bot_feedback-0.2.5 → git_bot_feedback-0.2.7}/src/comments/thread_comments.rs +0 -0
  49. {git_bot_feedback-0.2.5 → git_bot_feedback-0.2.7}/src/error.rs +0 -0
  50. {git_bot_feedback-0.2.5 → git_bot_feedback-0.2.7}/src/file_annotations.rs +0 -0
  51. {git_bot_feedback-0.2.5 → git_bot_feedback-0.2.7}/src/file_utils/file_filter.rs +0 -0
  52. {git_bot_feedback-0.2.5 → git_bot_feedback-0.2.7}/src/file_utils/mod.rs +0 -0
  53. {git_bot_feedback-0.2.5 → git_bot_feedback-0.2.7}/src/git_diff.rs +0 -0
  54. {git_bot_feedback-0.2.5 → git_bot_feedback-0.2.7}/src/lib.rs +0 -0
  55. {git_bot_feedback-0.2.5 → git_bot_feedback-0.2.7}/src/output_variable.rs +0 -0
  56. {git_bot_feedback-0.2.5 → git_bot_feedback-0.2.7}/uv.lock +0 -0
@@ -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/v0.8.5] - 2026-10-04
9
+ ## [git-bot-feedback/v0.8.6] - 2026-10-20
10
10
 
11
11
  ### <!-- 1 --> 🚀 Added
12
12
 
@@ -49,6 +49,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
49
49
  - Output only diff using `git show` by @2bndy5 in [#102](https://github.com/2bndy5/git-bot-feedback/pull/102)
50
50
  - Improve Github client's `get_list_of_changed_files()` by @2bndy5 in [#123](https://github.com/2bndy5/git-bot-feedback/pull/123)
51
51
  - Match descendants of a given glob pattern by @2bndy5 in [#132](https://github.com/2bndy5/git-bot-feedback/pull/132)
52
+ - Ensure `GITHUB_API_URL` ends with a `/` by @2bndy5 in [#140](https://github.com/2bndy5/git-bot-feedback/pull/140)
53
+ - Conditionally prepend marker to PR review summary by @2bndy5 in [#139](https://github.com/2bndy5/git-bot-feedback/pull/139)
52
54
 
53
55
  ### <!-- 8 --> 📝 Documentation
54
56
 
@@ -58,9 +60,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
58
60
 
59
61
  - Revise `FileAnnotations` impl by @2bndy5 in [#64](https://github.com/2bndy5/git-bot-feedback/pull/64)
60
62
 
61
- [git-bot-feedback/v0.8.5]: https://github.com/2bndy5/git-bot-feedback/compare/git-bot-feedback/v0.8.4...git-bot-feedback/v0.8.5
63
+ [git-bot-feedback/v0.8.6]: https://github.com/2bndy5/git-bot-feedback/compare/git-bot-feedback/v0.8.5...git-bot-feedback/v0.8.6
62
64
 
63
- Full commit diff: [`git-bot-feedback/v0.8.4...git-bot-feedback/v0.8.5`][git-bot-feedback/v0.8.5]
65
+ Full commit diff: [`git-bot-feedback/v0.8.5...git-bot-feedback/v0.8.6`][git-bot-feedback/v0.8.6]
64
66
 
65
67
  ## New Contributors
66
68
 
@@ -178,7 +178,7 @@ version = "3.1.1"
178
178
  source = "registry+https://github.com/rust-lang/crates.io-index"
179
179
  checksum = "faf9468729b8cbcea668e36183cb69d317348c2e08e994829fb56ebfdfbaac34"
180
180
  dependencies = [
181
- "windows-sys 0.61.2",
181
+ "windows-sys 0.52.0",
182
182
  ]
183
183
 
184
184
  [[package]]
@@ -276,7 +276,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
276
276
  checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb"
277
277
  dependencies = [
278
278
  "libc",
279
- "windows-sys 0.61.2",
279
+ "windows-sys 0.52.0",
280
280
  ]
281
281
 
282
282
  [[package]]
@@ -413,7 +413,7 @@ dependencies = [
413
413
 
414
414
  [[package]]
415
415
  name = "git-bot-feedback"
416
- version = "0.8.5"
416
+ version = "0.8.6"
417
417
  dependencies = [
418
418
  "async-trait",
419
419
  "chrono",
@@ -433,7 +433,7 @@ dependencies = [
433
433
 
434
434
  [[package]]
435
435
  name = "git-bot-feedback-py"
436
- version = "0.2.5"
436
+ version = "0.2.7"
437
437
  dependencies = [
438
438
  "git-bot-feedback",
439
439
  "pyo3",
@@ -1126,7 +1126,7 @@ dependencies = [
1126
1126
  "once_cell",
1127
1127
  "socket2",
1128
1128
  "tracing",
1129
- "windows-sys 0.61.2",
1129
+ "windows-sys 0.52.0",
1130
1130
  ]
1131
1131
 
1132
1132
  [[package]]
@@ -1320,7 +1320,7 @@ dependencies = [
1320
1320
  "errno",
1321
1321
  "libc",
1322
1322
  "linux-raw-sys",
1323
- "windows-sys 0.61.2",
1323
+ "windows-sys 0.52.0",
1324
1324
  ]
1325
1325
 
1326
1326
  [[package]]
@@ -1377,7 +1377,7 @@ dependencies = [
1377
1377
  "security-framework",
1378
1378
  "security-framework-sys",
1379
1379
  "webpki-root-certs",
1380
- "windows-sys 0.61.2",
1380
+ "windows-sys 0.52.0",
1381
1381
  ]
1382
1382
 
1383
1383
  [[package]]
@@ -1659,7 +1659,7 @@ dependencies = [
1659
1659
  "getrandom 0.4.3",
1660
1660
  "once_cell",
1661
1661
  "rustix",
1662
- "windows-sys 0.61.2",
1662
+ "windows-sys 0.52.0",
1663
1663
  ]
1664
1664
 
1665
1665
  [[package]]
@@ -1700,9 +1700,9 @@ checksum = "fd3ca314f692efd6c868f8408f53fe444634a845f96c028b97d35f6a1f79f0ee"
1700
1700
 
1701
1701
  [[package]]
1702
1702
  name = "tokio"
1703
- version = "1.53.1"
1703
+ version = "1.53.3"
1704
1704
  source = "registry+https://github.com/rust-lang/crates.io-index"
1705
- checksum = "202caea871b69668250d242070849eb495be178ed697a3e98aebce5bc81a0bed"
1705
+ checksum = "ce3335fa71841cda333a58d7615b03901380ecf09d59b3296d21f8bbac0dde4e"
1706
1706
  dependencies = [
1707
1707
  "bytes",
1708
1708
  "libc",
@@ -1974,7 +1974,7 @@ version = "0.1.11"
1974
1974
  source = "registry+https://github.com/rust-lang/crates.io-index"
1975
1975
  checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22"
1976
1976
  dependencies = [
1977
- "windows-sys 0.61.2",
1977
+ "windows-sys 0.52.0",
1978
1978
  ]
1979
1979
 
1980
1980
  [[package]]
@@ -21,7 +21,7 @@ features = ["http2", "charset", "system-proxy"]
21
21
  [package]
22
22
  name = "git-bot-feedback"
23
23
  description = "A library designed for CI tools that posts comments on a Pull Request."
24
- version = "0.8.5"
24
+ version = "0.8.6"
25
25
  edition.workspace = true
26
26
  license.workspace = true
27
27
  repository.workspace = true
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: git-bot-feedback
3
- Version: 0.2.5
3
+ Version: 0.2.7
4
4
  Classifier: Development Status :: 5 - Production/Stable
5
5
  Classifier: Intended Audience :: Developers
6
6
  Classifier: Intended Audience :: System Administrators
@@ -6,6 +6,35 @@ 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.2.7] - 2026-10-20
10
+
11
+ ### <!-- 4 --> 🛠️ Fixed
12
+
13
+ - Ensure `GITHUB_API_URL` ends with a `/` by @2bndy5 in [#140](https://github.com/2bndy5/git-bot-feedback/pull/140)
14
+ - Conditionally prepend marker to PR review summary by @2bndy5 in [#139](https://github.com/2bndy5/git-bot-feedback/pull/139)
15
+
16
+ ### <!-- 6 --> 📦 Dependency updates
17
+
18
+ - Bump version to git-bot-feedback/v0.8.6 by @2bndy5 in [`9e1f04d`](https://github.com/2bndy5/git-bot-feedback/commit/9e1f04dccc46ed7a939741a697f593ddc543e51e)
19
+
20
+ [git-bot-feedback-py/v0.2.7]: https://github.com/2bndy5/git-bot-feedback/compare/git-bot-feedback-py/v0.2.6...git-bot-feedback-py/v0.2.7
21
+
22
+ Full commit diff: [`git-bot-feedback-py/v0.2.6...git-bot-feedback-py/v0.2.7`][git-bot-feedback-py/v0.2.7]
23
+
24
+ ## [git-bot-feedback-py/v0.2.6] - 2026-10-06
25
+
26
+ ### <!-- 4 --> 🛠️ Fixed
27
+
28
+ - Add log grouping functions to python wrapper by @2bndy5 in [#133](https://github.com/2bndy5/git-bot-feedback/pull/133)
29
+
30
+ ### <!-- 6 --> 📦 Dependency updates
31
+
32
+ - Bump version to git-bot-feedback-py/v0.2.6 by @2bndy5 in [`790816f`](https://github.com/2bndy5/git-bot-feedback/commit/790816f60d781a9e514de742865e7c8de6e41dad)
33
+
34
+ [git-bot-feedback-py/v0.2.6]: https://github.com/2bndy5/git-bot-feedback/compare/git-bot-feedback-py/v0.2.5...git-bot-feedback-py/v0.2.6
35
+
36
+ Full commit diff: [`git-bot-feedback-py/v0.2.5...git-bot-feedback-py/v0.2.6`][git-bot-feedback-py/v0.2.6]
37
+
9
38
  ## [git-bot-feedback-py/v0.2.5] - 2026-10-04
10
39
 
11
40
  ### <!-- 4 --> 🛠️ Fixed
@@ -15,6 +44,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
15
44
  ### <!-- 6 --> 📦 Dependency updates
16
45
 
17
46
  - Bump version to git-bot-feedback/v0.8.5 by @2bndy5 in [`55b72b7`](https://github.com/2bndy5/git-bot-feedback/commit/55b72b7e472fc6e2f33d0d76a20d0d0c2ab3cd9f)
47
+ - Bump version to git-bot-feedback-py/v0.2.5 by @2bndy5 in [`02ed42d`](https://github.com/2bndy5/git-bot-feedback/commit/02ed42d76f20087dbe73b56a6db67aa9041ee23a)
18
48
 
19
49
  [git-bot-feedback-py/v0.2.5]: https://github.com/2bndy5/git-bot-feedback/compare/git-bot-feedback-py/v0.2.4...git-bot-feedback-py/v0.2.5
20
50
 
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "git-bot-feedback-py"
3
- version = "0.2.5"
3
+ version = "0.2.7"
4
4
  edition.workspace = true
5
5
  license.workspace = true
6
6
  repository.workspace = true
@@ -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.8.5", features = ["file-changes", "pyo3"] }
17
+ git-bot-feedback = { path = "../..", version = "0.8.6", 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"
@@ -6,6 +6,8 @@ class GitClient:
6
6
  def __init__(self) -> None: ...
7
7
  def is_pr_event(self) -> bool: ...
8
8
  def is_debug_enabled(self) -> bool: ...
9
+ def start_log_group(self, name: str) -> None: ...
10
+ def end_log_group(self, name: str) -> None: ...
9
11
  @property
10
12
  def event_name(self) -> str | None: ...
11
13
  def set_user_agent(self, user_agent: str) -> None: ...
@@ -218,6 +218,29 @@ impl GitClient {
218
218
  Ok(())
219
219
  }
220
220
 
221
+ /// Mark the start of a group of logs statements.
222
+ ///
223
+ /// The name given is used as the unique group name.
224
+ #[pyo3(
225
+ signature = (name),
226
+ text_signature = "(name: str) -> None"
227
+ )]
228
+ pub fn start_log_group(&self, name: &str) {
229
+ self.client.blocking_lock().start_log_group(name);
230
+ }
231
+
232
+ /// Mark the end of a group of logs statements.
233
+ ///
234
+ /// Some CI platforms expect the given name to match an already started group of logs.
235
+ /// Other CI platforms do not actually used the given name.
236
+ #[pyo3(
237
+ signature = (name),
238
+ text_signature = "(name: str) -> None"
239
+ )]
240
+ pub fn end_log_group(&self, name: &str) {
241
+ self.client.blocking_lock().end_log_group(name);
242
+ }
243
+
221
244
  // /// Construct a HTTP request to be sent.
222
245
  // ///
223
246
  // /// The idea here is that this method is called before [`Self::send_api_request()`].
@@ -6,6 +6,8 @@ class GitClient:
6
6
  def __init__(self) -> None: ...
7
7
  def is_pr_event(self) -> bool: ...
8
8
  def is_debug_enabled(self) -> bool: ...
9
+ def start_log_group(self, name: str) -> None: ...
10
+ def end_log_group(self, name: str) -> None: ...
9
11
  @property
10
12
  def event_name(self) -> str | None: ...
11
13
  def set_user_agent(self, user_agent: str) -> None: ...
@@ -334,7 +334,11 @@ impl RestApiClient for GithubApiClient {
334
334
  ReviewAction::Approve => String::from("APPROVE"),
335
335
  ReviewAction::RequestChanges => String::from("REQUEST_CHANGES"),
336
336
  },
337
- body: format!("{}{}", options.marker, options.summary),
337
+ body: if options.summary.starts_with(&options.marker) {
338
+ options.summary.clone()
339
+ } else {
340
+ format!("{}{}", options.marker, options.summary)
341
+ },
338
342
  comments: options
339
343
  .comments
340
344
  .iter()
@@ -40,7 +40,7 @@ impl GithubApiClient {
40
40
  };
41
41
  // GITHUB_*** env vars cannot be overwritten in CI runners on GitHub.
42
42
  let gh_api_url = env::var("GITHUB_API_URL").unwrap_or("https://api.github.com".to_string());
43
- let api_url = Url::parse(gh_api_url.as_str())?;
43
+ let api_url = Url::parse(format!("{}/", gh_api_url.trim_end_matches('/')).as_str())?;
44
44
 
45
45
  Ok(Self {
46
46
  client: Client::builder()
@@ -278,6 +278,11 @@ impl FileAnnotation {
278
278
 
279
279
  #[cfg(test)]
280
280
  mod tests {
281
+ #![allow(clippy::unwrap_used)]
282
+
283
+ use std::env;
284
+
285
+ use super::GithubApiClient;
281
286
  use crate::{AnnotationLevel, FileAnnotation};
282
287
 
283
288
  #[test]
@@ -413,4 +418,20 @@ mod tests {
413
418
  };
414
419
  assert_eq!(annotation.fmt_github(), "::debug::This is a debug message");
415
420
  }
421
+
422
+ #[test]
423
+ fn ensure_api_url_has_trailing_slash() {
424
+ let gh_api_url = "https://api.github.com/v3";
425
+ unsafe {
426
+ env::set_var("GITHUB_REPOSITORY", "2bndy5/git-bot-feedback");
427
+ env::set_var("GITHUB_SHA", "abc123");
428
+ env::set_var("GITHUB_EVENT_NAME", "push");
429
+ // suffix the URL with `//`; expect `client.api_url` to end with a single `/`
430
+ env::set_var("GITHUB_API_URL", format!("{gh_api_url}//"));
431
+ }
432
+ let client = GithubApiClient::new().unwrap();
433
+ assert!(client.api_url.as_str().ends_with("/v3/"));
434
+ let endpoint = client.api_url.join("repos/").unwrap();
435
+ assert_eq!(endpoint.as_str(), "https://api.github.com/v3/repos/");
436
+ }
416
437
  }