Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: github action will miss ref and use default branch #3822

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions custom_components/hacs/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ async def _async_initialize_integration(
if hacs.core.ha_version is None:
hacs.core.ha_version = AwesomeVersion(HAVERSION)

## Legacy GitHub client
# Legacy GitHub client
hacs.github = GitHub(
hacs.configuration.token,
clientsession,
Expand All @@ -96,7 +96,7 @@ async def _async_initialize_integration(
},
)

## New GitHub client
# New GitHub client
hacs.githubapi = GitHubAPI(
token=hacs.configuration.token,
session=clientsession,
Expand Down
1 change: 0 additions & 1 deletion custom_components/hacs/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@
from .repositories import REPOSITORY_CLASSES
from .repositories.base import HACS_MANIFEST_KEYS_TO_EXPORT, REPOSITORY_KEYS_TO_EXPORT
from .utils.file_system import async_exists
from .utils.json import json_loads
from .utils.logger import LOGGER
from .utils.queue_manager import QueueManager
from .utils.store import async_load_from_store, async_save_to_store
Expand Down
2 changes: 1 addition & 1 deletion custom_components/hacs/repositories/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ async def common_validate(self, ignore_issues: bool = False) -> None:

# Get the content of hacs.json
if RepositoryFile.HACS_JSON in [x.filename for x in self.tree]:
if manifest := await self.async_get_hacs_json():
if manifest := await self.get_hacs_json(version=self.ref):
self.repository_manifest = HacsManifest.from_dict(manifest)
self.data.update_data(
self.repository_manifest.to_dict(),
Expand Down
2 changes: 1 addition & 1 deletion custom_components/hacs/repositories/integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ async def validate_repository(self):
self.content.path.remote = f"custom_components/{name}"

# Get the content of manifest.json
if manifest := await self.async_get_integration_manifest():
if manifest := await self.get_integration_manifest(version=self.ref):
try:
self.integration_manifest = manifest
self.data.authors = manifest.get("codeowners", [])
Expand Down