This is an automated email from the ASF dual-hosted git repository.

arm pushed a commit to branch arm
in repository https://gitbox.apache.org/repos/asf/tooling-trusted-releases.git

commit 48b66b8f04d376d0b30ce1b85dcc20b68009cddb
Author: Alastair McFarlane <[email protected]>
AuthorDate: Fri Feb 20 09:41:18 2026 +0000

    Move github model into general models out of SBOM models
---
 atr/models/__init__.py            | 16 ++++++++++++++--
 atr/{sbom => }/models/github.py   |  4 ++--
 atr/sbom/models/__init__.py       |  4 ++--
 atr/tasks/checks/__init__.py      |  2 +-
 atr/tasks/checks/compare.py       |  2 +-
 tests/unit/test_checks_compare.py | 12 ++++++------
 6 files changed, 26 insertions(+), 14 deletions(-)

diff --git a/atr/models/__init__.py b/atr/models/__init__.py
index 3d7d9fd5..0eea22ce 100644
--- a/atr/models/__init__.py
+++ b/atr/models/__init__.py
@@ -15,7 +15,19 @@
 # specific language governing permissions and limitations
 # under the License.
 
-from . import api, basic, distribution, helpers, results, schema, session, 
sql, tabulate, validation
+from . import api, basic, distribution, github, helpers, results, schema, 
session, sql, tabulate, validation
 
 # If we use .__name__, pyright gives a warning
-__all__ = ["api", "basic", "distribution", "helpers", "results", "schema", 
"session", "sql", "tabulate", "validation"]
+__all__ = [
+    "api",
+    "basic",
+    "distribution",
+    "github",
+    "helpers",
+    "results",
+    "schema",
+    "session",
+    "sql",
+    "tabulate",
+    "validation",
+]
diff --git a/atr/sbom/models/github.py b/atr/models/github.py
similarity index 95%
rename from atr/sbom/models/github.py
rename to atr/models/github.py
index 99a4b8db..f8ebba14 100644
--- a/atr/sbom/models/github.py
+++ b/atr/models/github.py
@@ -17,10 +17,10 @@
 
 from __future__ import annotations
 
-from .base import Lax
+from . import schema
 
 
-class TrustedPublisherPayload(Lax):
+class TrustedPublisherPayload(schema.Lax):
     actor: str
     actor_id: str
     aud: str
diff --git a/atr/sbom/models/__init__.py b/atr/sbom/models/__init__.py
index b0dae618..15cf734c 100644
--- a/atr/sbom/models/__init__.py
+++ b/atr/sbom/models/__init__.py
@@ -17,6 +17,6 @@
 
 from __future__ import annotations
 
-from . import base, bom, bundle, conformance, github, licenses, osv, patch, 
sbomqs, tool
+from . import base, bom, bundle, conformance, licenses, osv, patch, sbomqs, 
tool
 
-__all__ = ["base", "bom", "bundle", "conformance", "github", "licenses", 
"osv", "patch", "sbomqs", "tool"]
+__all__ = ["base", "bom", "bundle", "conformance", "licenses", "osv", "patch", 
"sbomqs", "tool"]
diff --git a/atr/tasks/checks/__init__.py b/atr/tasks/checks/__init__.py
index 8451f333..4379322c 100644
--- a/atr/tasks/checks/__init__.py
+++ b/atr/tasks/checks/__init__.py
@@ -40,8 +40,8 @@ import atr.db as db
 import atr.file_paths as file_paths
 import atr.hashes as hashes
 import atr.log as log
+import atr.models.github as github_models
 import atr.models.sql as sql
-import atr.sbom.models.github as github_models
 import atr.util as util
 
 
diff --git a/atr/tasks/checks/compare.py b/atr/tasks/checks/compare.py
index 70f8daf1..914ebbf2 100644
--- a/atr/tasks/checks/compare.py
+++ b/atr/tasks/checks/compare.py
@@ -40,8 +40,8 @@ import atr.archives as archives
 import atr.attestable as attestable
 import atr.config as config
 import atr.log as log
+import atr.models.github as github_models
 import atr.models.results as results
-import atr.sbom.models.github as github_models
 import atr.tasks.checks as checks
 import atr.util as util
 
diff --git a/tests/unit/test_checks_compare.py 
b/tests/unit/test_checks_compare.py
index 80bc65ea..5e7eb505 100644
--- a/tests/unit/test_checks_compare.py
+++ b/tests/unit/test_checks_compare.py
@@ -26,8 +26,8 @@ import dulwich.objects
 import dulwich.refs
 import pytest
 
+import atr.models.github
 import atr.models.sql
-import atr.sbom.models.github
 import atr.tasks.checks
 import atr.tasks.checks.compare
 
@@ -39,7 +39,7 @@ class CheckoutRecorder:
 
     async def __call__(
         self,
-        payload: atr.sbom.models.github.TrustedPublisherPayload,
+        payload: atr.models.github.TrustedPublisherPayload,
         checkout_dir: pathlib.Path,
     ) -> str | None:
         self.checkout_dir = checkout_dir
@@ -194,12 +194,12 @@ class RunRecorder:
 
 
 class PayloadLoader:
-    def __init__(self, payload: atr.sbom.models.github.TrustedPublisherPayload 
| None) -> None:
+    def __init__(self, payload: atr.models.github.TrustedPublisherPayload | 
None) -> None:
         self.payload = payload
 
     async def __call__(
         self, project_name: str, version_name: str, revision_number: str
-    ) -> atr.sbom.models.github.TrustedPublisherPayload | None:
+    ) -> atr.models.github.TrustedPublisherPayload | None:
         return self.payload
 
 
@@ -935,7 +935,7 @@ def _make_payload(
     repository: str = "apache/test",
     ref: str = "refs/heads/main",
     sha: str = "0000000000000000000000000000000000000000",
-) -> atr.sbom.models.github.TrustedPublisherPayload:
+) -> atr.models.github.TrustedPublisherPayload:
     payload = {
         "actor": "actor",
         "actor_id": "1",
@@ -968,7 +968,7 @@ def _make_payload(
         "workflow_ref": "refs/heads/main",
         "workflow_sha": "ffffffffffffffffffffffffffffffffffffffff",
     }
-    return 
atr.sbom.models.github.TrustedPublisherPayload.model_validate(payload)
+    return atr.models.github.TrustedPublisherPayload.model_validate(payload)
 
 
 def _make_tree(root: pathlib.Path, files: Iterable[str]) -> None:


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to