Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Remove deprecated repository_object.get_contents usage from appdaemon#4900

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
ludeeus wants to merge2 commits intomain
base:main
Choose a base branch
Loading
fromad-repository_object.get_contents

Conversation

@ludeeus
Copy link
Member

No description provided.

CopilotAI review requested due to automatic review settingsNovember 2, 2025 16:58
Copy link
Contributor

CopilotAI 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 AppDaemon repository handling to use the git tree API directly instead of making separate API calls to list directory contents. This optimization reduces the number of GitHub API calls required during repository validation and updates.

Key changes:

  • Replaced separate GitHub API calls with tree-based directory lookup usingget_first_directory_in_directory
  • Updated test snapshots to reflect the reduced API call count (removed calls to/contents/apps and/contents/apps/example)
  • Fixed test fixture data to correct directory structure (changedappdaemons toapps)

Reviewed Changes

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

Show a summary per file
FileDescription
custom_components/hacs/repositories/appdaemon.pyRefactoredvalidate_repository andupdate_repository methods to use tree-based lookup instead of GitHub API calls
tests/snapshots/api-usage/tests/scripts/data/test_generate_category_datatest-generate-category-data-single-repository-hacs-test-org-appdaemon-basic.jsonUpdated snapshot to reflect removed API calls
tests/snapshots/api-usage/tests/scripts/data/test_generate_category_datatest-generate-category-data-hacs-test-org-appdaemon-basic.jsonUpdated snapshot to reflect removed API calls
tests/snapshots/api-usage/tests/repositories/test_update_repositorytest-update-repository-websocket-hacs-test-org-appdaemon-basic.jsonUpdated snapshot to reflect removed API calls
tests/snapshots/api-usage/tests/repositories/test_update_repositorytest-update-repository-entity-hacs-test-org-appdaemon-basic.jsonUpdated snapshot to reflect removed API calls
tests/snapshots/api-usage/tests/repositories/test_remove_repositorytest-remove-repository-hacs-test-org-appdaemon-basic.jsonUpdated snapshot to reflect removed API calls
tests/snapshots/api-usage/tests/repositories/test_download_repositorytest-download-repository-hacs-test-org-appdaemon-basic.jsonUpdated snapshot to reflect removed API calls
tests/fixtures/proxy/api.github.com/repos/hacs-test-org/appdaemon-basic/git/trees/main.jsonFixed typo in directory path and added proper tree structure entries
tests/fixtures/proxy/api.github.com/repos/hacs-test-org/appdaemon-basic/git/trees/2.0.0.jsonFixed typo in directory path and added proper tree structure entries
tests/fixtures/proxy/api.github.com/repos/hacs-test-org/appdaemon-basic/git/trees/1.0.0.jsonFixed typo in directory path and added proper tree structure entries

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

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

Reviewers

Copilot code reviewCopilotCopilot left review comments

@coderabbitaicoderabbitai[bot]coderabbitai[bot] approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@ludeeus

[8]ページ先頭

©2009-2025 Movatter.jp