File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -135,9 +135,6 @@ async def preflight():
135135 if ref .startswith ("refs/tags/" ):
136136 ref = ref .split ("/" )[- 1 ]
137137
138- LOGGER .info (f"Category: { category } " )
139- LOGGER .info (f"Repository: { repository } { f'@{ ref } ' if ref else '' } " )
140-
141138 if TOKEN is None :
142139 error ("No GitHub token found, use env GITHUB_TOKEN to set this." )
143140
@@ -150,10 +147,16 @@ async def preflight():
150147 if category not in CATEGORIES :
151148 error (f"Category { category } is not valid." )
152149
150+ if (repository_ref := os .getenv ("REPOSITORY_REF" )) is not None :
151+ ref = repository_ref
152+
153153 if ref is None and GITHUB_REPOSITORY != HacsGitHubRepo .DEFAULT :
154154 repo = await hacs .githubapi .repos .get (repository )
155155 ref = repo .data .default_branch
156156
157+ LOGGER .info (f"Category: { category } " )
158+ LOGGER .info (f"Repository: { repository } { f'@{ ref } ' if ref else '' } " )
159+
157160 await validate_repository (hacs , repository , category , ref )
158161
159162
You can’t perform that action at this time.
0 commit comments