Skip to content

Replace deprecated repository_object.get_contents usage from plugin#4901

Open
ludeeus wants to merge 2 commits intomainfrom
plugin-repository_object.get_contents
Open

Replace deprecated repository_object.get_contents usage from plugin#4901
ludeeus wants to merge 2 commits intomainfrom
plugin-repository_object.get_contents

Conversation

@ludeeus
Copy link
Member

@ludeeus ludeeus commented Nov 2, 2025

No description provided.

Copilot AI review requested due to automatic review settings November 2, 2025 18:09
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 get_package_content method in the plugin repository to use a more direct HTTP download approach instead of the GitHub API, aligning with patterns used elsewhere in the codebase.

  • Replaces GitHub API call (repository_object.get_contents) with direct file download (async_download_file)
  • Simplifies error handling using contextlib.suppress(Exception) instead of broad BaseException catching
  • Uses walrus operator for more concise conditional logic

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

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

2 participants