git-bot-feedback 0.6.2__tar.gz → 0.6.3__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 (66) hide show
  1. {git_bot_feedback-0.6.2 → git_bot_feedback-0.6.3}/CHANGELOG.md +14 -0
  2. {git_bot_feedback-0.6.2 → git_bot_feedback-0.6.3}/Cargo.lock +2 -2
  3. {git_bot_feedback-0.6.2 → git_bot_feedback-0.6.3}/Cargo.toml +1 -1
  4. {git_bot_feedback-0.6.2 → git_bot_feedback-0.6.3}/PKG-INFO +1 -1
  5. {git_bot_feedback-0.6.2 → git_bot_feedback-0.6.3}/bindings/python/CHANGELOG.md +15 -0
  6. {git_bot_feedback-0.6.2 → git_bot_feedback-0.6.3}/bindings/python/Cargo.toml +2 -2
  7. {git_bot_feedback-0.6.2 → git_bot_feedback-0.6.3}/src/client/github/mod.rs +40 -5
  8. {git_bot_feedback-0.6.2 → git_bot_feedback-0.6.3}/src/client/github/serde_structs.rs +23 -0
  9. {git_bot_feedback-0.6.2 → git_bot_feedback-0.6.3}/.gitattributes +0 -0
  10. {git_bot_feedback-0.6.2 → git_bot_feedback-0.6.3}/.gitignore +0 -0
  11. {git_bot_feedback-0.6.2 → git_bot_feedback-0.6.3}/.pre-commit-config.yaml +0 -0
  12. {git_bot_feedback-0.6.2 → git_bot_feedback-0.6.3}/AGENTS.md +0 -0
  13. {git_bot_feedback-0.6.2 → git_bot_feedback-0.6.3}/CONTRIBUTING.md +0 -0
  14. {git_bot_feedback-0.6.2 → git_bot_feedback-0.6.3}/LICENSE +0 -0
  15. {git_bot_feedback-0.6.2 → git_bot_feedback-0.6.3}/README.md +0 -0
  16. {git_bot_feedback-0.6.2 → git_bot_feedback-0.6.3}/README.rst +0 -0
  17. {git_bot_feedback-0.6.2 → git_bot_feedback-0.6.3}/bindings/python/README.rst +0 -0
  18. {git_bot_feedback-0.6.2 → git_bot_feedback-0.6.3}/bindings/python/git_bot_feedback.pyi +0 -0
  19. {git_bot_feedback-0.6.2 → git_bot_feedback-0.6.3}/bindings/python/src/lib.rs +0 -0
  20. {git_bot_feedback-0.6.2 → git_bot_feedback-0.6.3}/bindings/python/src/py_types.rs +0 -0
  21. {git_bot_feedback-0.6.2 → git_bot_feedback-0.6.3}/bindings/python/src/wrapper.rs +0 -0
  22. {git_bot_feedback-0.6.2 → git_bot_feedback-0.6.3}/build.rs +0 -0
  23. {git_bot_feedback-0.6.2 → git_bot_feedback-0.6.3}/codecov.yml +0 -0
  24. {git_bot_feedback-0.6.2 → git_bot_feedback-0.6.3}/cspell.config.yml +0 -0
  25. {git_bot_feedback-0.6.2 → git_bot_feedback-0.6.3}/docs/API/client.rst +0 -0
  26. {git_bot_feedback-0.6.2 → git_bot_feedback-0.6.3}/docs/API/errors.rst +0 -0
  27. {git_bot_feedback-0.6.2 → git_bot_feedback-0.6.3}/docs/API/file-annotations.rst +0 -0
  28. {git_bot_feedback-0.6.2 → git_bot_feedback-0.6.3}/docs/API/file-changes.rst +0 -0
  29. {git_bot_feedback-0.6.2 → git_bot_feedback-0.6.3}/docs/API/http.rst +0 -0
  30. {git_bot_feedback-0.6.2 → git_bot_feedback-0.6.3}/docs/API/index.rst +0 -0
  31. {git_bot_feedback-0.6.2 → git_bot_feedback-0.6.3}/docs/API/output-variables.rst +0 -0
  32. {git_bot_feedback-0.6.2 → git_bot_feedback-0.6.3}/docs/API/pr-reviews.rst +0 -0
  33. {git_bot_feedback-0.6.2 → git_bot_feedback-0.6.3}/docs/API/thread-comments.rst +0 -0
  34. {git_bot_feedback-0.6.2 → git_bot_feedback-0.6.3}/docs/_static/favicon.ico +0 -0
  35. {git_bot_feedback-0.6.2 → git_bot_feedback-0.6.3}/docs/_static/logo.png +0 -0
  36. {git_bot_feedback-0.6.2 → git_bot_feedback-0.6.3}/docs/conf.py +0 -0
  37. {git_bot_feedback-0.6.2 → git_bot_feedback-0.6.3}/docs/index.rst +0 -0
  38. {git_bot_feedback-0.6.2 → git_bot_feedback-0.6.3}/docs/logo.xcf +0 -0
  39. {git_bot_feedback-0.6.2 → git_bot_feedback-0.6.3}/docs/permissions/gitlab.md +0 -0
  40. {git_bot_feedback-0.6.2 → git_bot_feedback-0.6.3}/git_bot_feedback.pyi +0 -0
  41. {git_bot_feedback-0.6.2 → git_bot_feedback-0.6.3}/nurfile +0 -0
  42. {git_bot_feedback-0.6.2 → git_bot_feedback-0.6.3}/pyproject.toml +0 -0
  43. {git_bot_feedback-0.6.2 → git_bot_feedback-0.6.3}/src/client/common.rs +0 -0
  44. {git_bot_feedback-0.6.2 → git_bot_feedback-0.6.3}/src/client/gitea/mod.rs +0 -0
  45. {git_bot_feedback-0.6.2 → git_bot_feedback-0.6.3}/src/client/gitea/serde_structs.rs +0 -0
  46. {git_bot_feedback-0.6.2 → git_bot_feedback-0.6.3}/src/client/gitea/specific_api.rs +0 -0
  47. {git_bot_feedback-0.6.2 → git_bot_feedback-0.6.3}/src/client/github/graphql.rs +0 -0
  48. {git_bot_feedback-0.6.2 → git_bot_feedback-0.6.3}/src/client/github/specific_api.rs +0 -0
  49. {git_bot_feedback-0.6.2 → git_bot_feedback-0.6.3}/src/client/gitlab/diff_positions.rs +0 -0
  50. {git_bot_feedback-0.6.2 → git_bot_feedback-0.6.3}/src/client/gitlab/mod.rs +0 -0
  51. {git_bot_feedback-0.6.2 → git_bot_feedback-0.6.3}/src/client/gitlab/reviews.rs +0 -0
  52. {git_bot_feedback-0.6.2 → git_bot_feedback-0.6.3}/src/client/gitlab/serde_structs.rs +0 -0
  53. {git_bot_feedback-0.6.2 → git_bot_feedback-0.6.3}/src/client/gitlab/specific_api.rs +0 -0
  54. {git_bot_feedback-0.6.2 → git_bot_feedback-0.6.3}/src/client/local.rs +0 -0
  55. {git_bot_feedback-0.6.2 → git_bot_feedback-0.6.3}/src/client/mod.rs +0 -0
  56. {git_bot_feedback-0.6.2 → git_bot_feedback-0.6.3}/src/comments/mod.rs +0 -0
  57. {git_bot_feedback-0.6.2 → git_bot_feedback-0.6.3}/src/comments/review_comments.rs +0 -0
  58. {git_bot_feedback-0.6.2 → git_bot_feedback-0.6.3}/src/comments/thread_comments.rs +0 -0
  59. {git_bot_feedback-0.6.2 → git_bot_feedback-0.6.3}/src/error.rs +0 -0
  60. {git_bot_feedback-0.6.2 → git_bot_feedback-0.6.3}/src/file_annotations.rs +0 -0
  61. {git_bot_feedback-0.6.2 → git_bot_feedback-0.6.3}/src/file_utils/file_filter.rs +0 -0
  62. {git_bot_feedback-0.6.2 → git_bot_feedback-0.6.3}/src/file_utils/mod.rs +0 -0
  63. {git_bot_feedback-0.6.2 → git_bot_feedback-0.6.3}/src/git_diff.rs +0 -0
  64. {git_bot_feedback-0.6.2 → git_bot_feedback-0.6.3}/src/lib.rs +0 -0
  65. {git_bot_feedback-0.6.2 → git_bot_feedback-0.6.3}/src/output_variable.rs +0 -0
  66. {git_bot_feedback-0.6.2 → git_bot_feedback-0.6.3}/uv.lock +0 -0
@@ -6,6 +6,16 @@ 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.12.3] - 2026-11-16
10
+
11
+ ### <!-- 4 --> 🛠️ Fixed
12
+
13
+ - Use GH commit API endpoint as fallback by @2bndy5 in [#172](https://github.com/2bndy5/git-bot-feedback/pull/172)
14
+
15
+ [git-bot-feedback/v0.12.3]: https://github.com/2bndy5/git-bot-feedback/compare/git-bot-feedback/v0.12.2...git-bot-feedback/v0.12.3
16
+
17
+ Full commit diff: [`git-bot-feedback/v0.12.2...git-bot-feedback/v0.12.3`][git-bot-feedback/v0.12.3]
18
+
9
19
  ## [git-bot-feedback/v0.12.2] - 2026-11-16
10
20
 
11
21
  ### <!-- 4 --> 🛠️ Fixed
@@ -13,6 +23,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
13
23
  - Get the right changed files for `pull_request_target` and multi-commit pushes by @shenxianpeng in [#168](https://github.com/2bndy5/git-bot-feedback/pull/168)
14
24
  - Skip files without line changes when lines-changed-only is on by @shenxianpeng in [#170](https://github.com/2bndy5/git-bot-feedback/pull/170)
15
25
 
26
+ ### <!-- 6 --> 📦 Dependency updates
27
+
28
+ - Bump version to git-bot-feedback/v0.12.2 by @2bndy5 in [`d314a30`](https://github.com/2bndy5/git-bot-feedback/commit/d314a3083421cff41b6ee62ac51a70dea4549a58)
29
+
16
30
  [git-bot-feedback/v0.12.2]: https://github.com/2bndy5/git-bot-feedback/compare/git-bot-feedback/v0.12.1...git-bot-feedback/v0.12.2
17
31
 
18
32
  Full commit diff: [`git-bot-feedback/v0.12.1...git-bot-feedback/v0.12.2`][git-bot-feedback/v0.12.2]
@@ -413,7 +413,7 @@ dependencies = [
413
413
 
414
414
  [[package]]
415
415
  name = "git-bot-feedback"
416
- version = "0.12.2"
416
+ version = "0.12.3"
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.6.2"
436
+ version = "0.6.3"
437
437
  dependencies = [
438
438
  "git-bot-feedback",
439
439
  "pyo3",
@@ -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.12.2"
24
+ version = "0.12.3"
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.6.2
3
+ Version: 0.6.3
4
4
  Classifier: Development Status :: 5 - Production/Stable
5
5
  Classifier: Intended Audience :: Developers
6
6
  Classifier: Intended Audience :: System Administrators
@@ -6,6 +6,20 @@ 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.6.3] - 2026-11-16
10
+
11
+ ### <!-- 4 --> 🛠️ Fixed
12
+
13
+ - Use GH commit API endpoint as fallback by @2bndy5 in [#172](https://github.com/2bndy5/git-bot-feedback/pull/172)
14
+
15
+ ### <!-- 6 --> 📦 Dependency updates
16
+
17
+ - Bump version to git-bot-feedback/v0.12.3 by @2bndy5 in [`a3312f4`](https://github.com/2bndy5/git-bot-feedback/commit/a3312f43d0573156401fa139f9a1159e6194dc50)
18
+
19
+ [git-bot-feedback-py/v0.6.3]: https://github.com/2bndy5/git-bot-feedback/compare/git-bot-feedback-py/v0.6.2...git-bot-feedback-py/v0.6.3
20
+
21
+ Full commit diff: [`git-bot-feedback-py/v0.6.2...git-bot-feedback-py/v0.6.3`][git-bot-feedback-py/v0.6.3]
22
+
9
23
  ## [git-bot-feedback-py/v0.6.2] - 2026-11-16
10
24
 
11
25
  ### <!-- 4 --> 🛠️ Fixed
@@ -16,6 +30,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
16
30
  ### <!-- 6 --> 📦 Dependency updates
17
31
 
18
32
  - Bump version to git-bot-feedback/v0.12.2 by @2bndy5 in [`d314a30`](https://github.com/2bndy5/git-bot-feedback/commit/d314a3083421cff41b6ee62ac51a70dea4549a58)
33
+ - Bump version to git-bot-feedback-py/v0.6.2 by @2bndy5 in [`45272d3`](https://github.com/2bndy5/git-bot-feedback/commit/45272d389db3b8ea9c37d786bf68021f127b9582)
19
34
 
20
35
  [git-bot-feedback-py/v0.6.2]: https://github.com/2bndy5/git-bot-feedback/compare/git-bot-feedback-py/v0.6.1...git-bot-feedback-py/v0.6.2
21
36
 
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "git-bot-feedback-py"
3
- version = "0.6.2"
3
+ version = "0.6.3"
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.12.2", features = ["file-changes", "pyo3"] }
17
+ git-bot-feedback = { path = "../..", version = "0.12.3", features = ["file-changes", "pyo3"] }
18
18
  pyo3 = { workspace = true }
19
19
  pyo3-async-runtimes = { version = "0.30.0", features = ["tokio-runtime"] }
20
20
  pyo3-log = "0.13.5"
@@ -255,8 +255,13 @@ impl RestApiClient for GithubApiClient {
255
255
  false,
256
256
  ),
257
257
  };
258
- let mut url = Some(Url::parse_with_params(url.as_str(), &[("page", "1")])?);
258
+ let mut url = Some(if is_pr {
259
+ Url::parse_with_params(url.as_str(), &[("page", "1")])?
260
+ } else {
261
+ Url::parse_with_params(url.as_str(), &[("page", "1"), ("per_page", "100")])?
262
+ });
259
263
  let mut files: HashMap<String, FileDiffLines> = HashMap::new();
264
+ let mut received_files = 0;
260
265
  while let Some(endpoint) = url.take() {
261
266
  let request = self.make_api_request(&self.client, endpoint, Method::GET, None, None)?;
262
267
  let response = self
@@ -281,9 +286,18 @@ impl RestApiClient for GithubApiClient {
281
286
  serde_json::from_str::<Vec<serde_structs::GithubChangedFile>>(&body)
282
287
  .map_err(|e| ClientError::json("deserialize list of changed files", e))?
283
288
  };
289
+ received_files += files_list.len();
284
290
  Self::collect_changed_files(files_list, file_filter, lines_changed_only, &mut files)?;
285
291
  }
286
292
 
293
+ if !is_pr && received_files >= Self::COMMIT_FILES_LIMIT {
294
+ log::warn!(
295
+ "GitHub lists at most {} changed files for a commit. \
296
+ Some files changed by this push may be missing.",
297
+ Self::COMMIT_FILES_LIMIT
298
+ );
299
+ }
300
+
287
301
  Ok(files)
288
302
  }
289
303
 
@@ -375,6 +389,8 @@ impl RestApiClient for GithubApiClient {
375
389
  impl GithubApiClient {
376
390
  /// The most files that GitHub lists when comparing 2 commits.
377
391
  const COMPARE_FILES_LIMIT: usize = 300;
392
+ /// The most files that GitHub lists for a commit.
393
+ const COMMIT_FILES_LIMIT: usize = 3000;
378
394
 
379
395
  /// Add the qualifying `files_list` (from a REST API response) to `files`.
380
396
  fn collect_changed_files(
@@ -431,7 +447,8 @@ impl GithubApiClient {
431
447
  /// commit (`GITHUB_SHA`) with the commit that the branch pointed to before (`base`).
432
448
  ///
433
449
  /// Returns [`None`] if the commits cannot be compared (eg. `base` no longer exists
434
- /// after a force push). The caller should then only use the pushed commit's changes.
450
+ /// after a force push), or if a single-commit comparison reaches GitHub's file limit.
451
+ /// The caller should then only use the pushed commit's changes.
435
452
  async fn get_pushed_files(
436
453
  &self,
437
454
  base: &str,
@@ -459,10 +476,28 @@ impl GithubApiClient {
459
476
  );
460
477
  return Ok(None);
461
478
  }
462
- let files_list =
479
+ let comparison =
463
480
  serde_json::from_str::<serde_structs::PushEventFiles>(&response.text().await?)
464
- .map_err(|e| ClientError::json("deserialize list of changed files", e))?
465
- .files;
481
+ .map_err(|e| ClientError::json("deserialize list of changed files", e))?;
482
+ let is_single_commit_push = comparison.total_commits.unwrap_or(comparison.commits.len())
483
+ == 1
484
+ && comparison.commits.first().is_some_and(|commit| {
485
+ commit.sha == self.sha
486
+ && commit.parents.len() == 1
487
+ && commit
488
+ .parents
489
+ .first()
490
+ .is_some_and(|parent| parent.sha == base)
491
+ });
492
+ if comparison.files.len() >= Self::COMPARE_FILES_LIMIT && is_single_commit_push {
493
+ log::debug!(
494
+ "Comparison reached GitHub's {}-file limit for a single-commit push. \
495
+ Using the paginated commit-files endpoint.",
496
+ Self::COMPARE_FILES_LIMIT
497
+ );
498
+ return Ok(None);
499
+ }
500
+ let files_list = comparison.files;
466
501
  if files_list.len() >= Self::COMPARE_FILES_LIMIT {
467
502
  log::warn!(
468
503
  "GitHub lists at most {} changed files when comparing commits. \
@@ -114,6 +114,29 @@ pub struct GithubChangedFile {
114
114
  pub struct PushEventFiles {
115
115
  /// The list of changed files.
116
116
  pub files: Vec<GithubChangedFile>,
117
+ /// The number of commits in a compare response.
118
+ #[serde(default)]
119
+ pub total_commits: Option<usize>,
120
+ /// The commits returned by a compare response.
121
+ #[serde(default)]
122
+ pub commits: Vec<GitHubCommitSummary>,
123
+ }
124
+
125
+ #[cfg(feature = "file-changes")]
126
+ #[derive(Debug, Deserialize, PartialEq, Clone)]
127
+ pub struct GitHubCommitSummary {
128
+ /// The commit's SHA.
129
+ pub sha: String,
130
+ /// The commit's parents.
131
+ #[serde(default)]
132
+ pub parents: Vec<GitHubCommitParent>,
133
+ }
134
+
135
+ #[cfg(feature = "file-changes")]
136
+ #[derive(Debug, Deserialize, PartialEq, Clone)]
137
+ pub struct GitHubCommitParent {
138
+ /// The parent's SHA.
139
+ pub sha: String,
117
140
  }
118
141
 
119
142
  /// A structure for deserializing a Push event's payload.