imbi-plugin-github 2.64.0__tar.gz → 2.66.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 (33) hide show
  1. {imbi_plugin_github-2.64.0 → imbi_plugin_github-2.66.0}/PKG-INFO +2 -2
  2. {imbi_plugin_github-2.64.0 → imbi_plugin_github-2.66.0}/pyproject.toml +2 -2
  3. {imbi_plugin_github-2.64.0 → imbi_plugin_github-2.66.0}/src/imbi/plugins/github/deployment.py +13 -0
  4. {imbi_plugin_github-2.64.0 → imbi_plugin_github-2.66.0}/tests/test_deployment.py +26 -2
  5. {imbi_plugin_github-2.64.0 → imbi_plugin_github-2.66.0}/.gitignore +0 -0
  6. {imbi_plugin_github-2.64.0 → imbi_plugin_github-2.66.0}/README.md +0 -0
  7. {imbi_plugin_github-2.64.0 → imbi_plugin_github-2.66.0}/moon.yml +0 -0
  8. {imbi_plugin_github-2.64.0 → imbi_plugin_github-2.66.0}/src/imbi/plugins/github/README.md +0 -0
  9. {imbi_plugin_github-2.64.0 → imbi_plugin_github-2.66.0}/src/imbi/plugins/github/__init__.py +0 -0
  10. {imbi_plugin_github-2.64.0 → imbi_plugin_github-2.66.0}/src/imbi/plugins/github/_app_auth.py +0 -0
  11. {imbi_plugin_github-2.64.0 → imbi_plugin_github-2.66.0}/src/imbi/plugins/github/_hosts.py +0 -0
  12. {imbi_plugin_github-2.64.0 → imbi_plugin_github-2.66.0}/src/imbi/plugins/github/_repos.py +0 -0
  13. {imbi_plugin_github-2.64.0 → imbi_plugin_github-2.66.0}/src/imbi/plugins/github/commits.py +0 -0
  14. {imbi_plugin_github-2.64.0 → imbi_plugin_github-2.66.0}/src/imbi/plugins/github/doctor.py +0 -0
  15. {imbi_plugin_github-2.64.0 → imbi_plugin_github-2.66.0}/src/imbi/plugins/github/identity.py +0 -0
  16. {imbi_plugin_github-2.64.0 → imbi_plugin_github-2.66.0}/src/imbi/plugins/github/lifecycle.py +0 -0
  17. {imbi_plugin_github-2.64.0 → imbi_plugin_github-2.66.0}/src/imbi/plugins/github/plugin.py +0 -0
  18. {imbi_plugin_github-2.64.0 → imbi_plugin_github-2.66.0}/src/imbi/plugins/github/public.py +0 -0
  19. {imbi_plugin_github-2.64.0 → imbi_plugin_github-2.66.0}/src/imbi/plugins/github/pull_requests.py +0 -0
  20. {imbi_plugin_github-2.64.0 → imbi_plugin_github-2.66.0}/src/imbi/plugins/github/py.typed +0 -0
  21. {imbi_plugin_github-2.64.0 → imbi_plugin_github-2.66.0}/src/imbi/plugins/github/secret_provider.py +0 -0
  22. {imbi_plugin_github-2.64.0 → imbi_plugin_github-2.66.0}/tests/__init__.py +0 -0
  23. {imbi_plugin_github-2.64.0 → imbi_plugin_github-2.66.0}/tests/test_app_auth_scopes.py +0 -0
  24. {imbi_plugin_github-2.64.0 → imbi_plugin_github-2.66.0}/tests/test_commits.py +0 -0
  25. {imbi_plugin_github-2.64.0 → imbi_plugin_github-2.66.0}/tests/test_doctor.py +0 -0
  26. {imbi_plugin_github-2.64.0 → imbi_plugin_github-2.66.0}/tests/test_hosts.py +0 -0
  27. {imbi_plugin_github-2.64.0 → imbi_plugin_github-2.66.0}/tests/test_identity.py +0 -0
  28. {imbi_plugin_github-2.64.0 → imbi_plugin_github-2.66.0}/tests/test_lifecycle.py +0 -0
  29. {imbi_plugin_github-2.64.0 → imbi_plugin_github-2.66.0}/tests/test_public.py +0 -0
  30. {imbi_plugin_github-2.64.0 → imbi_plugin_github-2.66.0}/tests/test_pull_requests.py +0 -0
  31. {imbi_plugin_github-2.64.0 → imbi_plugin_github-2.66.0}/tests/test_repos.py +0 -0
  32. {imbi_plugin_github-2.64.0 → imbi_plugin_github-2.66.0}/tests/test_secret_provider.py +0 -0
  33. {imbi_plugin_github-2.64.0 → imbi_plugin_github-2.66.0}/tests/test_secret_provider_live.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: imbi-plugin-github
3
- Version: 2.64.0
3
+ Version: 2.66.0
4
4
  Summary: GitHub identity plugin for Imbi (github.com / GHEC / GHES)
5
5
  Author-email: "Gavin M. Roy" <gavinr@aweber.com>
6
6
  License-Expression: BSD-3-Clause
@@ -12,7 +12,7 @@ Classifier: Programming Language :: Python :: 3
12
12
  Classifier: Programming Language :: Python :: 3.14
13
13
  Requires-Python: >=3.14
14
14
  Requires-Dist: httpx>=0.27
15
- Requires-Dist: imbi-common[databases]==2.64.0
15
+ Requires-Dist: imbi-common[databases]==2.66.0
16
16
  Requires-Dist: pydantic>=2
17
17
  Requires-Dist: pyjwt[crypto]>=2.8
18
18
  Description-Content-Type: text/markdown
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "imbi-plugin-github"
3
- version = "2.64.0"
3
+ version = "2.66.0"
4
4
  description = "GitHub identity plugin for Imbi (github.com / GHEC / GHES)"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.14"
@@ -18,7 +18,7 @@ classifiers = [
18
18
  ]
19
19
  dependencies = [
20
20
  "httpx>=0.27",
21
- "imbi-common[databases]==2.64.0",
21
+ "imbi-common[databases]==2.66.0",
22
22
  "pydantic>=2",
23
23
  "pyjwt[crypto]>=2.8",
24
24
  ]
@@ -49,6 +49,7 @@ from imbi.common.plugins.base import (
49
49
  ArtifactRun,
50
50
  CheckStatus,
51
51
  Commit,
52
+ CompareFile,
52
53
  CompareResult,
53
54
  DeploymentCapability,
54
55
  DeploymentEventStatus,
@@ -1177,6 +1178,18 @@ class GitHubDeployment(DeploymentCapability):
1177
1178
  files_changed=len(files),
1178
1179
  additions=additions,
1179
1180
  deletions=deletions,
1181
+ files_truncated=len(files) >= _COMPARE_FILES_CAP,
1182
+ files=[
1183
+ CompareFile(
1184
+ path=str(f.get('filename') or ''),
1185
+ previous_path=f.get('previous_filename'),
1186
+ status=str(f.get('status') or 'modified'),
1187
+ additions=int(f.get('additions') or 0),
1188
+ deletions=int(f.get('deletions') or 0),
1189
+ patch=f.get('patch'),
1190
+ )
1191
+ for f in files
1192
+ ],
1180
1193
  )
1181
1194
 
1182
1195
  # -- Git notes ----------------------------------------------------------
@@ -725,14 +725,38 @@ class CompareTestCase(unittest.IsolatedAsyncioTestCase):
725
725
  },
726
726
  ],
727
727
  'files': [
728
- {'additions': 3, 'deletions': 1},
729
- {'additions': 0, 'deletions': 2},
728
+ {
729
+ 'filename': 'app.py',
730
+ 'status': 'modified',
731
+ 'additions': 3,
732
+ 'deletions': 1,
733
+ 'patch': '@@ -1 +1 @@',
734
+ },
735
+ {
736
+ 'filename': 'docs/b.md',
737
+ 'previous_filename': 'b.md',
738
+ 'status': 'renamed',
739
+ 'additions': 0,
740
+ 'deletions': 2,
741
+ },
730
742
  ],
731
743
  },
732
744
  )
733
745
  )
734
746
  plugin = GitHubDeployment()
735
747
  result = await plugin.compare(_ctx(), _CREDS, 'base', 'head')
748
+ self.assertEqual(
749
+ [
750
+ ('app.py', None, 'modified', '@@ -1 +1 @@'),
751
+ ('docs/b.md', 'b.md', 'renamed', None),
752
+ ],
753
+ [
754
+ (f.path, f.previous_path, f.status, f.patch)
755
+ for f in result.files
756
+ ],
757
+ )
758
+ # The patches are for server-side readers, not the API response.
759
+ self.assertNotIn('files', result.model_dump())
736
760
  self.assertEqual(result.ahead, 2)
737
761
  self.assertEqual(result.behind, 0)
738
762
  self.assertEqual(len(result.commits), 2)