MCPcopy Create free account
hub / github.com/MaterializeInc/materialize / is_public

Method is_public

misc/python/materialize/mzbuild.py:1202–1215  ·  view source on GitHub ↗

Report whether the image's repo is public on (Docker Hub, GHCR). Each element is True (public), False (private/absent), or None (could not determine). Non-publishable images are reported as public on both, since they are never pushed and so the check does not apply to them.

(self)

Source from the content-addressed store, hash-verified

1200 return False
1201
1202 def is_public(self) -> tuple[bool | None, bool | None]:
1203 """Report whether the image's repo is public on (Docker Hub, GHCR).
1204
1205 Each element is True (public), False (private/absent), or None (could
1206 not determine). Non-publishable images are reported as public on both,
1207 since they are never pushed and so the check does not apply to them.
1208 """
1209 if not self.publish:
1210 return (True, True)
1211 spec = self.spec()
1212 if spec.startswith(GHCR_PREFIX):
1213 spec = spec.removeprefix(GHCR_PREFIX)
1214 ghcr_spec = f"{GHCR_PREFIX}{spec}"
1215 return (is_docker_image_public(spec), is_ghcr_image_public(ghcr_spec))
1216
1217 def run(
1218 self,

Callers

nothing calls this directly

Calls 3

specMethod · 0.95
is_docker_image_publicFunction · 0.85
is_ghcr_image_publicFunction · 0.85

Tested by

no test coverage detected