MCPcopy
hub / github.com/hacs/integration / validate_repository

Function validate_repository

action/action.py:160–181  ·  view source on GitHub ↗

Validate.

(hacs: HacsBase, repository: str, category: str, ref=None)

Source from the content-addressed store, hash-verified

158
159
160async def validate_repository(hacs: HacsBase, repository: str, category: str, ref=None):
161 """Validate."""
162 # Legacy GitHub client
163 hacs.github = GitHub(
164 hacs.configuration.token,
165 hacs.session,
166 headers=HACS_ACTION_GITHUB_API_HEADERS,
167 )
168
169 try:
170 await hacs.async_register_repository(
171 repository_full_name=repository,
172 category=category,
173 ref=ref,
174 )
175 except HacsException as exception:
176 error(exception)
177
178 if (repo := hacs.repositories.get_by_full_name(repository)) is None:
179 error(f"Repository {repository} not loaded properly in HACS.")
180
181 output_in_group("data", json.dumps(repo.data.to_json(), indent=4))
182
183
184if __name__ == "__main__":

Callers 1

preflightFunction · 0.85

Calls 5

errorFunction · 0.85
output_in_groupFunction · 0.85
get_by_full_nameMethod · 0.80
to_jsonMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…