Thanks to visit codestin.com
Credit goes to Github.com

Skip to content

Conversation

@ludeeus
Copy link
Member

@ludeeus ludeeus commented Nov 2, 2025

The entire repository_object is deprecated in aiogithubapi; this is a small step in getting rid of it.

LegacyTreeFile has been added as a compatibility layer, as significant refactoring is needed to eliminate outdated assumptions.

Copilot AI review requested due to automatic review settings November 2, 2025 14:10
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors the repository tree fetching mechanism to use a direct API call instead of the legacy repository object method, introducing a LegacyTreeFile compatibility layer to maintain the expected tree structure interface.

  • Introduces LegacyTreeFile class as a compatibility wrapper around GitHubGitTreeEntryModel
  • Refactors get_tree() to directly call the GitHub API instead of using repository_object.get_tree()
  • Updates exception handling from AIOGitHubAPIException to GitHubException

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
custom_components/hacs/utils/workarounds.py Adds LegacyTreeFile class to wrap GitHub tree entry models with backward-compatible attributes
custom_components/hacs/repositories/base.py Refactors get_tree() method to use direct API call and wraps results in LegacyTreeFile objects

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants